Skip to content

Commit

Permalink
Added comment generating in build process; Fixed license in package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
anovi committed Dec 1, 2018
1 parent 799c0cf commit f6ebcb8
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/gulp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "gulp"
},
"author": "",
"license": "ISC",
"license": "MIT",
"dependencies": {
"gulp": "3.9.1",
"gulp-stylus": "2.7.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-css/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "webpack"
},
"author": "",
"license": "ISC",
"license": "MIT",
"dependencies": {
"css-loader": "1.0.1",
"setka": "0.1.2",
Expand Down
2 changes: 1 addition & 1 deletion examples/webpack-stylus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "webpack"
},
"author": "",
"license": "ISC",
"license": "MIT",
"dependencies": {
"autoprefixer": "9.3.1",
"css-loader": "1.0.1",
Expand Down
9 changes: 9 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ const autoprefixer = require('gulp-autoprefixer');
const src = './lib/setka/setka.styl'
const csso = require('gulp-csso');
const sourcemaps = require('gulp-sourcemaps');
const headerComment = require('gulp-header-comment');
const comment = `
Setka CSS Library v<%= pkg.version %>
Author: Alexey Novichkov
License: MIT (https://github.com/anovi/setka/blob/master/LICENSE)
Generated on <%= moment().format('YYYY-MM-DD') %>
`

// Get one .styl file and render
gulp.task('build', function () {
Expand All @@ -15,6 +22,7 @@ gulp.task('build', function () {
.pipe(autoprefixer({
cascade: false
}))
.pipe(headerComment(comment))
.pipe(rename("setka.css"))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist'));
Expand All @@ -32,6 +40,7 @@ gulp.task('build-mini', function () {
sourceMap: true,
debug: true
}))
.pipe(headerComment(comment))
.pipe(rename("setka.min.css"))
.pipe(sourcemaps.write('.'))
.pipe(gulp.dest('./dist'));
Expand Down
48 changes: 48 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"gulp": "3.9.1",
"gulp-autoprefixer": "6.0.0",
"gulp-csso": "3.0.1",
"gulp-header-comment": "0.4.0",
"gulp-rename": "1.4.0",
"gulp-sourcemaps": "2.6.4",
"gulp-stylus": "2.7.0",
Expand All @@ -35,7 +36,7 @@
"grid",
"layout"
],
"license": "ISC",
"license": "MIT",
"bugs": {
"url": "https://github.com/anovi/setka/issues"
},
Expand Down

0 comments on commit f6ebcb8

Please sign in to comment.