Skip to content

Commit 4b437f1

Browse files
committed
Add gulp task to copy global scss file into resource folder (we will not do conversion of scss to css for global files as it will only be used in drupal). Update instruction for publish npm to make it more clear.
1 parent c626e58 commit 4b437f1

File tree

2 files changed

+39
-3
lines changed

2 files changed

+39
-3
lines changed

Note.txt

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ How to build production build:
7676

7777
How to publish to npm:
7878
#########################################
79+
You will need to upzip the tgz generated by the "npm pack" command above, and then go to package folder
80+
You will need to make sure you are in the package directory before you log into npm. If you ever change directory, redo login again.
81+
Always check "npm whoami" to make sure you are as your npm login, not your pc login.
82+
7983
bradleys-mbp:package anniehuang$ npm login
8084
Username: annie.huang
8185
Password:
@@ -99,8 +103,24 @@ bradleys-mbp:package anniehuang$ npm version
99103
uv: '1.19.1',
100104
v8: '6.2.414.50',
101105
zlib: '1.2.11' }
102-
bradleys-mbp:package anniehuang$ npm version 0.0.2 << If you need to change version no for every publish.
103-
v0.0.2
106+
bradleys-mbp:package anniehuang$ npm version 0.0.5 << If you need to change version no for every publish.
107+
v0.0.5
108+
bradleys-mbp:package anniehuang$ npm version
109+
{ 'ea-c-l-test': '0.0.5', << Make sure the version number has changed.
110+
npm: '5.8.0',
111+
ares: '1.10.1-DEV',
112+
cldr: '32.0',
113+
http_parser: '2.7.0',
114+
icu: '60.1',
115+
modules: '57',
116+
nghttp2: '1.25.0',
117+
node: '8.10.0',
118+
openssl: '1.0.2n',
119+
tz: '2017c',
120+
unicode: '10.0',
121+
uv: '1.19.1',
122+
v8: '6.2.414.50',
123+
zlib: '1.2.11' }
104124
bradleys-mbp:package anniehuang$ npm publish
105125
106126

gulpfile.js

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ gulp.task('copy-component-scss', function () {
6464
.pipe(gulp.dest('resources/components'));
6565
});
6666

67+
gulp.task('copy-global-scss', function () {
68+
gulp.src([
69+
'src/scss/*.scss',
70+
'!src/scss/styles.scss'
71+
])
72+
.pipe(gulp.dest('resources/scss'));
73+
});
74+
6775
gulp.task('build-component-css', function () {
6876
gulp.src([
6977
'src/app/components/**/*.scss'
@@ -95,4 +103,12 @@ gulp.task('clean', function() {
95103

96104
//Building project with run sequence
97105
// gulp.task('build-assets', ['clean','copy-component-css', 'build-css-prod', 'images', 'themes']);
98-
gulp.task('build-assets', ['clean','copy-component-scss', 'build-component-css', 'build-css-prod', 'images', 'themes']);
106+
gulp.task('build-assets', [
107+
'clean',
108+
'copy-global-scss',
109+
'copy-component-scss',
110+
'build-component-css',
111+
'build-css-prod',
112+
'images',
113+
'themes'
114+
]);

0 commit comments

Comments
 (0)