Skip to content

Commit

Permalink
Removes fs as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
laurenhamel committed Jun 6, 2018
1 parent 07207c4 commit ed71fde
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 11 deletions.
5 changes: 0 additions & 5 deletions package-lock.json

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

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-dart-sass",
"version": "1.0.0",
"description": "Compile Sass to CSS via Dart Sass CLI",
"description": "Compile Sass to CSS via Dart Sass",
"repository": {
"type": "git",
"url": "git+https://github.com/laurenhamel/grunt-dart-sass.git"
Expand All @@ -21,7 +21,6 @@
"dependencies": {
"chalk": "^2.4.1",
"extend": "^3.0.1",
"fs": "0.0.1-security",
"intercept-stdout": "^0.1.2",
"path": "^0.12.7",
"sass": "^1.5.1"
Expand Down
7 changes: 3 additions & 4 deletions tasks/dart-sass.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,21 @@
module.exports = function (grunt) {

// Register Grunt multi-task.
grunt.registerMultiTask('dart-sass', 'Compile Sass to CSS via Dart Sass CLI', function () {
grunt.registerMultiTask('dart-sass', 'Compile Sass to CSS via Dart Sass', function () {

// Load dependencies.
const sass = require('sass');
const extend = require('extend');
const path = require('path');
const chalk = require('chalk');
const intercept = require('intercept-stdout');
const fs = require('fs');

// Make asynchronous.
const done = this.async();

// Set options.
const options = this.options({
sourceMap: true,
sourceMap: undefined,
sourceMapContents: false,
sourceMapEmbed: false,
sourceMapRoot: undefined,
Expand Down Expand Up @@ -98,7 +97,7 @@ module.exports = function (grunt) {
const result = sass.renderSync(data);

// Save the CSS file to its target destination
fs.writeFileSync(file.dest, results.css);
grunt.file.write(file.dest, results.css);

}

Expand Down

0 comments on commit ed71fde

Please sign in to comment.