semantic-ui-sass 2.4.3.0 → 2.4.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6ad5b58124f5f3a139802d76c6bb5f0ddf64886fdf921a6bd5bc31d4bb2249d0
4
- data.tar.gz: 396f3a31daf60fc2480e5c7e735fd702b00da584e622959883fa25041859bc5c
3
+ metadata.gz: a3f00aae59a977dfaf178f42ebefa9fb5b1a5de5f861da7a77ffd531b672c694
4
+ data.tar.gz: aab2b09fb6ac853ccd0209a764cf0320d85083554aceb1c04cd106f8eaa66290
5
5
  SHA512:
6
- metadata.gz: e479ce5b0ac82389197efd278d95b781d3592ab049963d8d7dd5154a37ed4c4b842f4378184c6b22f2ada328ed688f5c0404a9b300430c6e689a9d977755bcdf
7
- data.tar.gz: 9e1a360e178333324c7a535bc9db08bb21e9dc0c80f86a7fc38de3f549851b07086290952dfe4c1c6caf0b023491d33efb86d003253ceaff4d63e53fa9c240f9
6
+ metadata.gz: e23fa78e5d173a000019edb3fea7d2fead56fabab0a714baf61abbb60f270c6c5cb085ad9dc352ab1d281c56de74e0da29ec3ace8892851aaad70f751b65682e
7
+ data.tar.gz: 565777ec30e611b0ca3717a7c4f927c44e3654262cadc01fbf864f30649e7bf5f300aecbeb8f3616b285e31223a615e17093b233ec4c6ff4b1f6af1566aa7721
data/.gitignore CHANGED
@@ -25,3 +25,5 @@ spec/dummy/log/*.log
25
25
  spec/dummy/tmp/
26
26
  spec/dummy/.sass-cache
27
27
 
28
+ src
29
+ node_modules
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.4.4.0
2
+
3
+ - Add npm package
4
+
1
5
  ## 2.4.3.0
2
6
 
3
7
  - Change from `sass-rails` to `sassc-rails` to correct deprecation usage
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Semantic UI for Sass
2
2
 
3
- `semantic-ui-sass` is an Sass-powered version of [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) and ready to drop into Rails, Compass, or Sprockets.
3
+ `semantic-ui-sass` is an Sass-powered version of
4
+ [Semantic UI](https://github.com/Semantic-Org/Semantic-UI) and ready to drop
5
+ into Rails, Compass, or Sprockets.
4
6
 
5
7
  [![Build Status](https://travis-ci.org/doabit/semantic-ui-sass.svg?branch=master)](https://travis-ci.org/doabit/semantic-ui-sass)
6
8
 
@@ -14,22 +16,24 @@ The gem only has default theme.
14
16
  gem 'semantic-ui-sass'
15
17
  ```
16
18
 
17
- `bundle install` and restart your server to make the files available through the pipeline.
19
+ `bundle install` and restart your server to make the files available through the
20
+ pipeline.
18
21
 
19
22
  # semantic-ui-sass with Rails or Sprockets
20
23
 
21
24
  ## CSS
22
25
 
23
- Import Semantic in an SCSS file (for example, `application.css.scss`) to get all of Semantic's styles
26
+ Import Semantic in an SCSS file (for example, `application.css.scss`) to get all
27
+ of Semantic's styles
24
28
 
25
29
  ```css
26
- @import "semantic-ui";
30
+ @import 'semantic-ui';
27
31
  ```
28
32
 
29
33
  You can also include modules
30
34
 
31
35
  ```css
32
- @import "semantic-ui/collections/menu";
36
+ @import 'semantic-ui/collections/menu';
33
37
  ```
34
38
 
35
39
  ## Custom font
@@ -40,12 +44,14 @@ $font-url: 'http://fonts.useso.com/css?family=Lato:400,700,400italic,700italic&s
40
44
  ```
41
45
 
42
46
  ## Skip font loading
47
+
43
48
  ```css
44
49
  $import-google-fonts: false;
45
50
  @import 'semantic-ui';
46
51
  ```
47
52
 
48
53
  ## Custom font family
54
+
49
55
  ```css
50
56
  $font-family: 'custom-font-family';
51
57
  @import 'semantic-ui';
@@ -89,14 +95,16 @@ $widescreen-monitor-breakpoint: 1920px !default;
89
95
 
90
96
  ### Ruby on Rails Version 5
91
97
 
92
- We have a helper that includes all Semantic javascripts. Put this in your Javascript manifest (usually in `application.js`) to
98
+ We have a helper that includes all Semantic javascripts. Put this in your
99
+ Javascript manifest (usually in `application.js`) to
93
100
 
94
101
  ```js
95
102
  // Loads all Semantic javascripts
96
103
  //= require semantic-ui
97
104
  ```
98
105
 
99
- You can also load individual modules, provided you also require any dependencies.
106
+ You can also load individual modules, provided you also require any
107
+ dependencies.
100
108
 
101
109
  ```js
102
110
  //= require semantic-ui/modal
@@ -108,26 +116,30 @@ You can also load individual modules, provided you also require any dependencies
108
116
  Add packages with yarn:
109
117
 
110
118
  ```console
111
- yarn add jquery popper.js semantic-ui-sass
119
+ yarn add jquery popper.js @doabit/semantic-ui-sass
112
120
  ```
113
121
 
114
122
  In config/webpack/environment.js add the following:
115
123
 
116
124
  ```js
117
- const webpack = require("webpack")
125
+ const webpack = require('webpack')
118
126
 
119
- environment.plugins.append("Provide", new webpack.ProvidePlugin({
120
- $: 'jquery',
121
- jQuery: 'jquery',
122
- Popper: ['popper.js', 'default']
123
- }))
124
- ````
127
+ environment.plugins.append(
128
+ 'Provide',
129
+ new webpack.ProvidePlugin({
130
+ $: 'jquery',
131
+ jQuery: 'jquery',
132
+ Popper: ['popper.js', 'default']
133
+ })
134
+ )
135
+ ```
125
136
 
126
137
  In app/javascript/packs/application.js add the following:
127
138
 
128
139
  ```js
129
- require("semantic-ui-sass")
130
- ````
140
+ import '@doabit/semantic-ui-sass'
141
+ import '@doabit/semantic-ui-sass/src/scss/semantic-ui.scss'
142
+ ```
131
143
 
132
144
  # semantic-ui-sass with Compass
133
145
 
@@ -142,13 +154,16 @@ compass create compass-project -r semantic-ui-sass --using semantic-ui
142
154
 
143
155
  This will sort a few things out:
144
156
 
145
- * You'll get a starting `styles.scss`
146
- * You'll get a compiled stylesheet compiled & ready to drop into your application
147
- * We'll also copy the Semantic javascripts & images & fonts into their respective folders for you
157
+ - You'll get a starting `styles.scss`
158
+ - You'll get a compiled stylesheet compiled & ready to drop into your
159
+ application
160
+ - We'll also copy the Semantic javascripts & images & fonts into their
161
+ respective folders for you
148
162
 
149
163
  ## Existing project
150
164
 
151
- Install the gem, add the require statement to the top of your configuration file, and install the extension.
165
+ Install the gem, add the require statement to the top of your configuration
166
+ file, and install the extension.
152
167
 
153
168
  ```console
154
169
  gem install semantic-ui-sass
@@ -165,7 +180,9 @@ compass install semantic-ui
165
180
 
166
181
  ### NOTE
167
182
 
168
- When using compass, you should visit file in local server, eg `http://localhost:3000/index.html`, rather than `file:///Users/doabit/demo/index.html`
183
+ When using compass, you should visit file in local server, eg
184
+ `http://localhost:3000/index.html`, rather than
185
+ `file:///Users/doabit/demo/index.html`
169
186
 
170
187
  # Rails Helpers
171
188
 
@@ -217,8 +234,8 @@ semantic_icon('add', id: 'id')
217
234
 
218
235
  ## TODO
219
236
 
220
- * Add global variables
221
- * Add rails helpers like `render_flash`?
237
+ - Add global variables
238
+ - Add rails helpers like `render_flash`?
222
239
 
223
240
  ## Contributing
224
241
 
@@ -1,7 +1,7 @@
1
1
  module Semantic
2
2
  module Ui
3
3
  module Sass
4
- VERSION = "2.4.3.0"
4
+ VERSION = "2.4.4.0"
5
5
  SEMANTIC_UI_SHA = "3989d7243c514f9018a55eb53cb34daf3bbf5a26"
6
6
  end
7
7
  end
data/package.json ADDED
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "@doabit/semantic-ui-sass",
3
+ "version": "2.4.4",
4
+ "description": "semantic-ui-sass npm package",
5
+ "main": "src/semantic-ui.js",
6
+ "files": [
7
+ "src/**/*"
8
+ ],
9
+ "scripts": {
10
+ "prepublishOnly": "rm -rf src && yarn copy:js && yarn copy:css && yarn copy:assets && node ./script.js",
11
+ "copy:js": "cp -R app/assets/javascripts/semantic-ui src",
12
+ "copy:css": "cp -R app/assets/stylesheets/semantic-ui src/scss",
13
+ "copy:assets": "mkdir src/scss/assets && cp -R app/assets/fonts/semantic-ui src/scss/assets/fonts && cp -R app/assets/images/semantic-ui src/scss/assets/images"
14
+ },
15
+ "devDependencies": {},
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "git+https://github.com/doabit/semantic-ui-sass.git"
19
+ },
20
+ "keywords": [
21
+ "semantic-ui-sass"
22
+ ],
23
+ "author": "doabit",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/doabit/semantic-ui-sass/issues"
27
+ },
28
+ "homepage": "https://github.com/doabit/semantic-ui-sass#readme"
29
+ }
data/script.js ADDED
@@ -0,0 +1,56 @@
1
+ const jsContent = `import './api.js'
2
+ import './colorize.js'
3
+ import './form.js'
4
+ import './state.js'
5
+ import './visibility.js'
6
+ import './visit.js'
7
+ import './site.js'
8
+ import './accordion.js'
9
+ import './checkbox.js'
10
+ import './dimmer.js'
11
+ import './dropdown.js'
12
+ import './embed.js'
13
+ import './modal.js'
14
+ import './nag.js'
15
+ import './popup.js'
16
+ import './progress.js'
17
+ import './rating.js'
18
+ import './search.js'
19
+ import './shape.js'
20
+ import './sidebar.js'
21
+ import './sticky.js'
22
+ import './tab.js'
23
+ import './transition.js'
24
+ `
25
+ // create semantic-ui.js
26
+ const fs = require('fs')
27
+
28
+ fs.writeFile('./src/semantic-ui.js', jsContent, err => {
29
+ if (err) console.log('create semantic-ui.js fail', err)
30
+ })
31
+
32
+ // create semantic-ui.scss
33
+ const cssContent = `@import './globals/all';
34
+ @import './elements/all';
35
+ @import './collections/all';
36
+ @import './views/all';
37
+ @import './modules/all';
38
+ `
39
+ fs.writeFile('./src/scss/semantic-ui.scss', cssContent, err => {
40
+ if (err) console.log('create semantic-ui.scss fail', err)
41
+ })
42
+
43
+ // replace image-url and font-url
44
+ fs.writeFileSync(
45
+ './src/scss/elements/_icon.scss',
46
+ fs
47
+ .readFileSync('./src/scss/elements/_icon.scss', 'utf8')
48
+ .replace(/font-url\(\"semantic-ui/g, `url("assets/fonts`)
49
+ )
50
+
51
+ fs.writeFileSync(
52
+ './src/scss/elements/_flag.scss',
53
+ fs
54
+ .readFileSync('./src/scss/elements/_flag.scss', 'utf8')
55
+ .replace(/image-url\(\"semantic-ui/g, `url("assets/images`)
56
+ )
data/yarn.lock ADDED
@@ -0,0 +1,4 @@
1
+ # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2
+ # yarn lockfile v1
3
+
4
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semantic-ui-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.3.0
4
+ version: 2.4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - doabit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-26 00:00:00.000000000 Z
11
+ date: 2021-06-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -271,6 +271,8 @@ files:
271
271
  - lib/semantic/ui/sass/breadcrumbs.rb
272
272
  - lib/semantic/ui/sass/engine.rb
273
273
  - lib/semantic/ui/sass/version.rb
274
+ - package.json
275
+ - script.js
274
276
  - semantic-ui-sass.gemspec
275
277
  - spec/dummy/README.rdoc
276
278
  - spec/dummy/Rakefile
@@ -317,6 +319,7 @@ files:
317
319
  - tasks/converter.rb
318
320
  - templates/project/manifest.rb
319
321
  - templates/project/styles.scss
322
+ - yarn.lock
320
323
  homepage: http://github.com/doabit/semantic-ui-sass
321
324
  licenses:
322
325
  - MIT