Browse Source

refactor: use node-sass cli instead of grunt-sass (#2065)

pull/1415/merge
Yoshiya Hinosawa 8 years ago committed by Ændrew Rininsland
parent
commit
3d6efe846d
  1. 12
      Gruntfile.coffee
  2. 7
      package.json

12
Gruntfile.coffee

@ -2,10 +2,6 @@ module.exports = (grunt) ->
require('load-grunt-tasks') grunt, pattern: ['grunt-contrib-*', 'grunt-sass']
grunt.initConfig
watch:
sass:
tasks: 'sass'
files: ['src/scss/*.scss']
jshint:
c3: 'src/**/*.js'
@ -24,13 +20,5 @@ module.exports = (grunt) ->
src: 'c3.css'
dest: 'c3.min.css'
sass:
options:
sourcemap: 'none'
c3:
files:
'c3.css': 'src/scss/main.scss'
grunt.registerTask 'lint', ['jshint']
grunt.registerTask 'build', ['concat', 'sass']
grunt.registerTask 'minify', ['cssmin', 'uglify']

7
package.json

@ -7,7 +7,9 @@
"serve": "static -p 8080 htdocs/",
"prepublish": "npm run dist",
"lint": "grunt lint",
"build": "rollup -f umd --name c3 --globals d3:d3 src/index.js > c3.js",
"build": "npm run build:js && npm run build:css",
"build:js": "rollup -f umd --name c3 --globals d3:d3 src/index.js > c3.js",
"build:css": "node-sass src/scss/main.scss > c3.css",
"minify": "grunt minify",
"test": "npm run build && npm run lint && karma start karma.conf.js",
"dist": "npm run build && npm run minify",
@ -36,8 +38,6 @@
"grunt-contrib-cssmin": "^0.10.0",
"grunt-contrib-jshint": "^1.0.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-sass": "^2.0.0",
"jasmine-core": "^2.3.4",
"jshint-stylish": "^2.1.0",
"karma": "^0.13.10",
@ -46,6 +46,7 @@
"karma-phantomjs-launcher": "^0.2.1",
"karma-spec-reporter": "0.0.20",
"load-grunt-tasks": "~0.2.0",
"node-sass": "^4.5.3",
"node-static": "^0.7.9",
"phantomjs": "^1.9.18",
"rollup": "^0.41.6"

Loading…
Cancel
Save