Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
feat(cli): experimental compile cache
Browse files Browse the repository at this point in the history
  • Loading branch information
kwonoj committed Jul 14, 2018
1 parent 18c6f59 commit df0f79e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
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.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"get-stdin": "^6.0.0",
"source-map-support": "^0.5.6",
"tslib": "^1.9.3",
"unixify": "^1.0.0"
"unixify": "^1.0.0",
"v8-compile-cache": "^2.0.0"
},
"devDependencies": {
"@commitlint/cli": "^7.0.0",
Expand Down
1 change: 0 additions & 1 deletion src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { OutputStyle } from './index';
import { buildContext } from './interop/context';
import { SassOptionsInterface } from './interop/options/sassOptions';
import { SassContextInterface } from './interop/sassContext';
import './verbose';

const d = debug('libsass:cli');
const styleOptions = ['nested', 'expanded', 'compact', 'compressed'];
Expand Down
9 changes: 8 additions & 1 deletion src/verbose.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
/** side effect module to enable few verbose logging */
/**
* side effect module to enable few verbose logging.
* This is actual entry point to cli, loads necessary modules up front.
*/
/* tslint:disable:no-var-requires no-require-imports */
require('v8-compile-cache');

if (!!process.env.DEBUG) {
require('source-map-support').install();
const { log, enableLogger } = require('./util/logger');
enableLogger(require('debug')('libsass:logger'));
log('Enabling verbose log');
}

require('./cli');
2 changes: 1 addition & 1 deletion webpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as webpack from 'webpack';

module.exports = {
mode: 'production',
entry: './src/cli.ts',
entry: './src/verbose.ts',
devtool: 'source-map',

output: {
Expand Down

0 comments on commit df0f79e

Please sign in to comment.