Skip to content

Commit 3514513

Browse files
committed
Initial commit
1 parent af0c83e commit 3514513

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed
File renamed without changes.

package.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "superfly-css-task-deploy",
3+
"version": "0.0.0",
4+
"description": "Deploy task for superfly-css modules",
5+
"main": "src/main/js/index.js",
6+
"scripts": {
7+
"test": "clean && gulp deploy:css"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/superfly-css/superfly-css-task-deploy.git"
12+
},
13+
"keywords": [
14+
"deploy",
15+
"css",
16+
"minification",
17+
"uncss",
18+
"optimization",
19+
"serve",
20+
"gh-pages"
21+
],
22+
"author": "Ole Ersoy",
23+
"license": "MIT",
24+
"bugs": {
25+
"url": "https://github.com/superfly-css/superfly-css-task-deploy/issues"
26+
},
27+
"homepage": "https://github.com/superfly-css/superfly-css-task-deploy#readme",
28+
"dependencies": {
29+
"gulp-uncss": "^1.0.6",
30+
"superfly-css-pli": "0.0.9"
31+
}
32+
}

src/main/js/index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
var gulp = require('gulp');
2+
var uncss = require('gulp-uncss');
3+
4+
var PLI = require('superfly-css-pli');
5+
6+
7+
gulp.task('deploy:css', function() {
8+
gulp.src(PLI.TARGET_MAIN_CSS)
9+
.pipe(uncss({
10+
html: [PLI.TARGET_MAIN_HTML]
11+
}))
12+
.pipe(gulp.dest(PLI.deploy.main.css));
13+
14+
gulp.src(PLI.TARGET_TEST_CSS)
15+
.pipe(uncss({
16+
html: [PLI.TARGET_TEST_HTML]
17+
}))
18+
.pipe(gulp.dest(PLI.deploy.test.css));
19+
20+
gulp
21+
.src(PLI.TARGET_MAIN_HTML)
22+
.pipe(gulp.dest(PLI.deploy.main.html));
23+
24+
return gulp
25+
.src(PLI.TARGET_TEST_HTML)
26+
.pipe(gulp.dest(PLI.deploy.test.html));
27+
});

0 commit comments

Comments
 (0)