From 82c30217691b7f7c0c7c630031dd5b77e0934417 Mon Sep 17 00:00:00 2001 From: Jon Rohan Date: Fri, 9 Sep 2016 18:45:44 -0400 Subject: [PATCH] Stop using sass as a dependency --- Gruntfile.js | 44 +++++++++++++------------------------------- index.scss | 1 - lib/octicons.scss | 6 ------ package.json | 6 ++---- 4 files changed, 15 insertions(+), 42 deletions(-) delete mode 100644 index.scss delete mode 100644 lib/octicons.scss diff --git a/Gruntfile.js b/Gruntfile.js index 7ee7c19be..f3b510b66 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -7,30 +7,8 @@ module.exports = function(grunt) { pkg: grunt.file.readJSON('package.json'), - sass: { - options: { - }, - dist: { - files: { - 'build/octicons.css': 'index.scss' - } - } - }, - - postcss: { - options: { - processors: [ - require('autoprefixer')({ browsers: '> 5%' }) - ] - }, - build: { - src: 'build/**/*.*css' - } - }, - cssnano: { - options: { - }, + options: {}, dist: { files: { 'build/octicons.min.css': 'build/octicons.css' @@ -81,24 +59,28 @@ module.exports = function(grunt) { }, clean: { - svg: [ - 'build/svg/*', - 'build/sprite.octicons.svg', - 'build/octicons.*' + build: [ + 'build/*' ] + }, + + copy: { + css: { + src: "lib/octicons.css", + dest: "build/octicons.css" + } } }); grunt.loadNpmTasks('grunt-contrib-clean'); - grunt.loadNpmTasks('grunt-postcss'); + grunt.loadNpmTasks('grunt-contrib-copy'); grunt.loadNpmTasks('grunt-svg-sprite'); grunt.loadNpmTasks('grunt-svgmin'); grunt.loadNpmTasks('grunt-cssnano'); - grunt.loadNpmTasks('grunt-sass'); // build tasks - grunt.registerTask('css', ['sass', 'postcss', 'cssnano']); - grunt.registerTask('svg', ['clean:svg', 'svgmin', 'svg_sprite']); + grunt.registerTask('css', ['copy', 'cssnano']); + grunt.registerTask('svg', ['clean', 'svgmin', 'svg_sprite']); // default task, build /dist/ grunt.registerTask('default', [ 'svg', 'css', 'svg_json']); diff --git a/index.scss b/index.scss deleted file mode 100644 index e7dcce946..000000000 --- a/index.scss +++ /dev/null @@ -1 +0,0 @@ -@import "./lib/octicons.scss"; diff --git a/lib/octicons.scss b/lib/octicons.scss deleted file mode 100644 index 060ec5549..000000000 --- a/lib/octicons.scss +++ /dev/null @@ -1,6 +0,0 @@ -// SVG icons -.octicon { - display: inline-block; - vertical-align: text-top; - fill: currentColor; -} diff --git a/package.json b/package.json index 37476e046..a0a028832 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,9 @@ "homepage": "https://octicons.github.com", "author": "GitHub Inc.", "license": "(OFL-1.1 OR MIT)", - "style": "index.scss", + "style": "build/octicons.css", "main": "index.js", "files": [ - "index.scss", "index.js", "lib", "build" @@ -27,9 +26,8 @@ "ava": "^0.16.0", "grunt": "^1.0.1", "grunt-contrib-clean": "^1.0.0", + "grunt-contrib-copy": "^1.0.0", "grunt-cssnano": "^2.1.0", - "grunt-postcss": "^0.8.0", - "grunt-sass": "^1.2.0", "grunt-svg-sprite": "^1.2.19", "grunt-svgmin": "^3.2.0" },