Merge branch 'master' into upgrade-shower-cli-version
This commit is contained in:
commit
0c40d04316
|
@ -1,3 +1,3 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- "6"
|
||||
- "8"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# The MIT License
|
||||
|
||||
Copyright © 2010–2018 Vadim Makeev, http://pepelsbey.net/
|
||||
Copyright © 2010–2019 Vadim Makeev, http://pepelsbey.net/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
@ -12,7 +12,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|||
|
||||
# Лицензия MIT
|
||||
|
||||
Copyright © 2010–2018 Вадим Макеев, http://pepelsbey.net/
|
||||
Copyright © 2010–2019 Вадим Макеев, http://pepelsbey.net/
|
||||
|
||||
Данная лицензия разрешает лицам, получившим копию данного программного обеспечения и сопутствующей документации (в дальнейшем именуемыми «Программное Обеспечение»), безвозмездно использовать Программное Обеспечение без ограничений, включая неограниченное право на использование, копирование, изменение, добавление, публикацию, распространение, сублицензирование и/или продажу копий Программного Обеспечения, также как и лицам, которым предоставляется данное Программное Обеспечение, при соблюдении следующих условий:
|
||||
|
||||
|
|
110
gulpfile.js
110
gulpfile.js
|
@ -1,110 +0,0 @@
|
|||
const del = require('del');
|
||||
const gulp = require('gulp');
|
||||
const merge = require('merge-stream');
|
||||
const rename = require('gulp-rename');
|
||||
const replace = require('gulp-replace');
|
||||
const zip = require('gulp-zip');
|
||||
const pages = require('gh-pages');
|
||||
const sync = require('browser-sync').create();
|
||||
|
||||
gulp.task('prepare', () => {
|
||||
|
||||
const shower = gulp.src([
|
||||
'**',
|
||||
'!docs{,/**}',
|
||||
'!node_modules{,/**}',
|
||||
'!prepared{,/**}',
|
||||
'!CONTRIBUTING.md',
|
||||
'!LICENSE.md',
|
||||
'!README.md',
|
||||
'!gulpfile.js',
|
||||
'!netlify.toml',
|
||||
'!package.json',
|
||||
'!package-lock.json'
|
||||
])
|
||||
.pipe(replace(
|
||||
/(<link rel="stylesheet" href=")(node_modules\/@shower\/)([^\/]*)\/(.*\.css">)/g,
|
||||
'$1shower/themes/$3/$4', { skipBinary: true }
|
||||
))
|
||||
.pipe(replace(
|
||||
/(<script src=")(node_modules\/shower-core\/)(shower.min.js"><\/script>)/g,
|
||||
'$1shower/$3', { skipBinary: true }
|
||||
));
|
||||
|
||||
const core = gulp.src([
|
||||
'shower.min.js'
|
||||
], {
|
||||
cwd: 'node_modules/shower-core'
|
||||
})
|
||||
.pipe(rename( (path) => {
|
||||
path.dirname = 'shower/' + path.dirname;
|
||||
}));
|
||||
|
||||
const material = gulp.src([
|
||||
'**', '!package.json'
|
||||
], {
|
||||
cwd: 'node_modules/@shower/material'
|
||||
})
|
||||
.pipe(rename( (path) => {
|
||||
path.dirname = 'shower/themes/material/' + path.dirname;
|
||||
}))
|
||||
|
||||
const ribbon = gulp.src([
|
||||
'**', '!package.json'
|
||||
], {
|
||||
cwd: 'node_modules/@shower/ribbon'
|
||||
})
|
||||
.pipe(rename( (path) => {
|
||||
path.dirname = 'shower/themes/ribbon/' + path.dirname;
|
||||
}));
|
||||
|
||||
const themes = merge(material, ribbon)
|
||||
.pipe(replace(
|
||||
/(<script src=")(\/shower-core\/)(shower.min.js"><\/script>)/,
|
||||
'$1../../$3', { skipBinary: true }
|
||||
));
|
||||
|
||||
return merge(shower, core, themes)
|
||||
.pipe(gulp.dest('prepared'));
|
||||
|
||||
});
|
||||
|
||||
gulp.task('clean', () => {
|
||||
return del('prepared/**');
|
||||
});
|
||||
|
||||
gulp.task('zip', () => {
|
||||
return gulp.src('prepared/**')
|
||||
.pipe(zip('archive.zip'))
|
||||
.pipe(gulp.dest('.'));
|
||||
});
|
||||
|
||||
gulp.task('upload', () => {
|
||||
return pages.publish('prepared')
|
||||
});
|
||||
|
||||
gulp.task('archive', gulp.series(
|
||||
'prepare',
|
||||
'zip',
|
||||
'clean'
|
||||
));
|
||||
|
||||
gulp.task('publish', gulp.series(
|
||||
'prepare',
|
||||
'upload',
|
||||
'clean'
|
||||
));
|
||||
|
||||
gulp.task('serve', () => {
|
||||
sync.init({
|
||||
ui: false,
|
||||
notify: false,
|
||||
port: 3000,
|
||||
server: {
|
||||
baseDir: '.'
|
||||
}
|
||||
});
|
||||
gulp.watch('index.html').on('change', () => {
|
||||
sync.reload();
|
||||
});
|
||||
});
|
|
@ -204,7 +204,7 @@
|
|||
<div class="progress"></div>
|
||||
|
||||
<script src="node_modules/shower-core/shower.min.js"></script>
|
||||
<!-- Copyright © 2018 Yours Truly, Famous Inc. -->
|
||||
<!-- Copyright © 3000 Yours Truly, Famous Inc. -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
File diff suppressed because it is too large
Load Diff
20
package.json
20
package.json
|
@ -27,28 +27,20 @@
|
|||
"README.md"
|
||||
],
|
||||
"dependencies": {
|
||||
"@shower/material": "^2.2.0",
|
||||
"@shower/ribbon": "^3.2.1",
|
||||
"@shower/material": "^2.2.1",
|
||||
"@shower/ribbon": "^3.2.2",
|
||||
"shower-core": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"browser-sync": "^2.26.3",
|
||||
"del": "^3.0.0",
|
||||
"gh-pages": "^2.0.0",
|
||||
"gulp": "^4.0.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-replace": "^1.0.0",
|
||||
"gulp-zip": "^4.0.0",
|
||||
"merge-stream": "^1.0.0",
|
||||
"path-exists-cli": "^1.0.0",
|
||||
"shower-cli": "^0.2.6"
|
||||
},
|
||||
"scripts": {
|
||||
"pdf": "shower pdf",
|
||||
"start": "gulp serve",
|
||||
"prepare": "gulp prepare",
|
||||
"archive": "gulp archive",
|
||||
"publish": "gulp publish",
|
||||
"start": "shower serve",
|
||||
"prepare": "shower prepare --files '**' --files '!{docs,node_modules,prepared}{,/**}' --files '!*.{md,toml,json}'",
|
||||
"archive": "shower archive --files '**' --files '!{docs,node_modules,prepared}{,/**}' --files '!*.{md,toml,json}'",
|
||||
"publish": "shower publish --files '**' --files '!{docs,node_modules,prepared}{,/**}' --files '!*.{md,toml,json}'",
|
||||
"test": "npm run prepare && ls prepared && npm run archive && path-exists archive.zip"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue