Skip to content

Commit

Permalink
Patch sass not to depend on a system
Browse files Browse the repository at this point in the history
  • Loading branch information
hqjs committed Aug 29, 2019
1 parent 00ebe5d commit efc7c61
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Expand Up @@ -66,5 +66,5 @@ typings/
# VSCode
.vscode-test

# No package-lock
package-lock.json
# Builds
*.vsce
3 changes: 1 addition & 2 deletions .vscodeignore
@@ -1,9 +1,8 @@
.vscode/**
.vscode-test/**
src/**
test/**
.gitignore
vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json
patch-sass.js
Binary file removed hq-live-server-0.0.2.vsix
Binary file not shown.
Binary file modified images/screen/hq-editor-menu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/screen/hq-explorer-menu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/screen/hq-running.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/screen/hq-statusbar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Expand Up @@ -3,7 +3,7 @@
"displayName": "HQ Live Server",
"description": "Lightning fast, zero configuration, web application development server with livereload",
"publisher": "hqjs",
"version": "0.0.2",
"version": "0.0.3",
"author": {
"name": "HQJS",
"email": "hqjs.org@gmail.com",
Expand Down Expand Up @@ -148,11 +148,12 @@
"homepage": "https://hqjs.org",
"scripts": {
"test": "node ./test/runTest.js",
"postinstall": "npm rebuild"
"postinstall": "npm install sass && node ./patch-sass.js"
},
"dependencies": {
"@hqjs/hq": "^0.0.12",
"open": "^6.4.0",
"sass": "^1.22.10",
"vsls": "^0.3.1291"
},
"devDependencies": {
Expand Down
12 changes: 12 additions & 0 deletions patch-sass.js
@@ -0,0 +1,12 @@
const fs = require('fs-extra');

console.log('Removing node-sass');
fs.removeSync('node_modules/node-sass');

console.log('Patching postcss-node-sass');
const postCSSNodeSass = fs.readFileSync('node_modules/postcss-node-sass/index.js', { encoding: 'utf8' });
fs.writeFileSync(
'node_modules/postcss-node-sass/index.js',
postCSSNodeSass.replace('require(\'node-sass\')', 'require(\'sass\')'),
{ encoding: 'utf8' }
);

0 comments on commit efc7c61

Please sign in to comment.