Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
e2b1e1a735 | |||
eeb042c3a9 | |||
7a4372f104 | |||
caa194dee6 | |||
5913245604 | |||
ad753b3a9a | |||
9fc47fcca1 | |||
cfcff789a2 | |||
134618cb3a | |||
9bbbf82b20 | |||
23aa8efef2 | |||
d09b5773ca | |||
b1165827a1 | |||
581bae156e | |||
42573648b9 | |||
b9266d0a9a | |||
3cf679365f | |||
5c13a1d568 | |||
2fb3a039f4 | |||
cc91855a48 | |||
ef4ee3ee0b | |||
975f27d241 | |||
33cb6ac697 | |||
df11f7fe64 | |||
42faa6a389 | |||
733a67b597 |
20
.gitignore
vendored
20
.gitignore
vendored
@ -1,4 +1,22 @@
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
node_modules/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
|
||||
# custom
|
@ -1,60 +1,118 @@
|
||||
# gitzone standard
|
||||
image: hosttoday/ht-docker-node:npmts
|
||||
# gitzone ci_default
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci_cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
|
||||
stages:
|
||||
- security
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- pages
|
||||
- metadata
|
||||
|
||||
testLEGACY:
|
||||
stage: test
|
||||
# ====================
|
||||
# security stage
|
||||
# ====================
|
||||
mirror:
|
||||
stage: security
|
||||
script:
|
||||
- npmci test legacy
|
||||
- npmci git mirror
|
||||
tags:
|
||||
- docker
|
||||
allow_failure: true
|
||||
- notpriv
|
||||
|
||||
testLTS:
|
||||
stage: test
|
||||
snyk:
|
||||
stage: security
|
||||
script:
|
||||
- npmci test lts
|
||||
- npmci npm prepare
|
||||
- npmci command npm install -g snyk
|
||||
- npmci command npm install --ignore-scripts
|
||||
- npmci command snyk test
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
testSTABLE:
|
||||
# ====================
|
||||
# test stage
|
||||
# ====================
|
||||
|
||||
testStable:
|
||||
stage: test
|
||||
script:
|
||||
- npmci test stable
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
testBuild:
|
||||
stage: test
|
||||
script:
|
||||
- npmci npm prepare
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci command npm run build
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
- npmci publish
|
||||
- npmci node install stable
|
||||
- npmci npm publish
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
# ====================
|
||||
# metadata stage
|
||||
# ====================
|
||||
codequality:
|
||||
stage: metadata
|
||||
allow_failure: true
|
||||
script:
|
||||
- npmci command npm install -g tslint typescript
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command "tslint -c tslint.json ./ts/**/*.ts"
|
||||
tags:
|
||||
- docker
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
|
||||
pages:
|
||||
image: hosttoday/ht-docker-node:npmpage
|
||||
stage: pages
|
||||
stage: metadata
|
||||
script:
|
||||
- npmci command npmpage --publish gitlab
|
||||
- npmci node install lts
|
||||
- npmci command npm install -g @gitzone/tsdoc
|
||||
- npmci npm prepare
|
||||
- npmci npm install
|
||||
- npmci command tsdoc
|
||||
tags:
|
||||
- docker
|
||||
- notpriv
|
||||
only:
|
||||
- tags
|
||||
artifacts:
|
||||
expire_in: 1 week
|
||||
paths:
|
||||
- public
|
||||
allow_failure: true
|
||||
|
69
.snyk
Normal file
69
.snyk
Normal file
@ -0,0 +1,69 @@
|
||||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
|
||||
version: v1.13.5
|
||||
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
|
||||
ignore:
|
||||
SNYK-JS-NODESASS-535497:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-535498:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-535502:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540956:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540958:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540964:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540974:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540978:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540980:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540990:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540992:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540994:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540996:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-540998:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-541000:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.940Z'
|
||||
SNYK-JS-NODESASS-541002:
|
||||
- node-sass:
|
||||
reason: None given
|
||||
expires: '2020-02-12T19:06:41.941Z'
|
||||
patch: {}
|
53
README.md
53
README.md
@ -1,29 +1,50 @@
|
||||
# smartsass
|
||||
# @pushrocks/smartsass
|
||||
smart wrapper for sass
|
||||
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/smartsass)
|
||||
[](https://GitLab.com/pushrocks/smartsass)
|
||||
[](https://github.com/pushrocks/smartsass)
|
||||
[](https://pushrocks.gitlab.io/smartsass/)
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@pushrocks/smartsass)
|
||||
* [gitlab.com (source)](https://gitlab.com/pushrocks/smartsass)
|
||||
* [github.com (source mirror)](https://github.com/pushrocks/smartsass)
|
||||
* [docs (typedoc)](https://pushrocks.gitlab.io/smartsass/)
|
||||
|
||||
## Status for master
|
||||
[](https://GitLab.com/pushrocks/smartsass/commits/master)
|
||||
[](https://GitLab.com/pushrocks/smartsass/commits/master)
|
||||
[](https://www.npmjs.com/package/smartsass)
|
||||
[](https://david-dm.org/pushrocks/smartsass)
|
||||
[](https://www.bithound.io/github/pushrocks/smartsass/master/dependencies/npm)
|
||||
[](https://www.bithound.io/github/pushrocks/smartsass)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||
[](http://standardjs.com/)
|
||||
[](https://gitlab.com/pushrocks/smartsass/commits/master)
|
||||
[](https://gitlab.com/pushrocks/smartsass/commits/master)
|
||||
[](https://www.npmjs.com/package/@pushrocks/smartsass)
|
||||
[](https://snyk.io/test/npm/@pushrocks/smartsass)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
## Usage
|
||||
|
||||
Use TypeScript for best in class instellisense.
|
||||
|
||||
```javascript
|
||||
import * as smartsass from 'smartsass'
|
||||
import * as bourbon from 'bourbon
|
||||
import * as neat from 'neat'
|
||||
|
||||
let mySmartsass = new smartsass.Smartsass({
|
||||
filePath: './some.css',
|
||||
includePaths: bourbon.includePaths
|
||||
})
|
||||
|
||||
mySmartsass.addIncludePaths(neat.includePaths)
|
||||
|
||||
let renderedString = mySmartsass.render()
|
||||
```
|
||||
|
||||
For further information read the linked docs at the top of this README.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
> | By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[](https://push.rocks)
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy)
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
||||
|
16
dist/index.d.ts
vendored
16
dist/index.d.ts
vendored
@ -1,16 +0,0 @@
|
||||
import { Result } from 'node-sass';
|
||||
export interface ISmartsassConstructorOptions {
|
||||
entryFilePath: string;
|
||||
}
|
||||
export declare class Smartsass {
|
||||
entryFilePath: string;
|
||||
constructor(optionsArg: ISmartsassConstructorOptions);
|
||||
/**
|
||||
* renders the Smartsass classes' entryfile and returns result as string
|
||||
*/
|
||||
render(): Promise<Result>;
|
||||
/**
|
||||
* renders and stores
|
||||
*/
|
||||
renderAndStore(outputFilePath: string): Promise<void>;
|
||||
}
|
43
dist/index.js
vendored
43
dist/index.js
vendored
@ -1,43 +0,0 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = require("./smartsass.plugins");
|
||||
class Smartsass {
|
||||
constructor(optionsArg) {
|
||||
this.entryFilePath = optionsArg.entryFilePath;
|
||||
}
|
||||
/**
|
||||
* renders the Smartsass classes' entryfile and returns result as string
|
||||
*/
|
||||
render() {
|
||||
let done = plugins.smartq.defer();
|
||||
plugins.sass.render({
|
||||
file: this.entryFilePath
|
||||
}, function (err, result) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
done.reject(err);
|
||||
}
|
||||
done.resolve(result);
|
||||
});
|
||||
return done.promise;
|
||||
}
|
||||
/**
|
||||
* renders and stores
|
||||
*/
|
||||
renderAndStore(outputFilePath) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
let result = yield this.render();
|
||||
yield plugins.smartfile.memory.toFs(result.css.toString(), outputFilePath);
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.Smartsass = Smartsass;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7O0FBQUEsK0NBQThDO0FBUzlDO0lBRUUsWUFBWSxVQUF3QztRQUNsRCxJQUFJLENBQUMsYUFBYSxHQUFHLFVBQVUsQ0FBQyxhQUFhLENBQUE7SUFDL0MsQ0FBQztJQUVEOztPQUVHO0lBQ0gsTUFBTTtRQUNKLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQyxNQUFNLENBQUMsS0FBSyxFQUF1QixDQUFBO1FBQ3RELE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxDQUFDO1lBQ2xCLElBQUksRUFBRSxJQUFJLENBQUMsYUFBYTtTQUN6QixFQUFFLFVBQVUsR0FBRyxFQUFFLE1BQU07WUFDdEIsRUFBRSxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQztnQkFDUixPQUFPLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFBO2dCQUNoQixJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBQyxDQUFBO1lBQ2xCLENBQUM7WUFDRCxJQUFJLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUFBO1FBQ3RCLENBQUMsQ0FBQyxDQUFBO1FBQ0YsTUFBTSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUE7SUFDckIsQ0FBQztJQUVEOztPQUVHO0lBQ0csY0FBYyxDQUFFLGNBQXNCOztZQUMxQyxJQUFJLE1BQU0sR0FBRyxNQUFNLElBQUksQ0FBQyxNQUFNLEVBQUUsQ0FBQTtZQUNoQyxNQUFNLE9BQU8sQ0FBQyxTQUFTLENBQUMsTUFBTSxDQUFDLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFDLFFBQVEsRUFBRSxFQUFFLGNBQWMsQ0FBQyxDQUFBO1FBQzVFLENBQUM7S0FBQTtDQUNGO0FBOUJELDhCQThCQyJ9
|
5
dist/smartsass.plugins.d.ts
vendored
5
dist/smartsass.plugins.d.ts
vendored
@ -1,5 +0,0 @@
|
||||
import 'typings-global';
|
||||
import * as sass from 'node-sass';
|
||||
import * as smartfile from 'smartfile';
|
||||
import * as smartq from 'smartq';
|
||||
export { sass, smartfile, smartq };
|
10
dist/smartsass.plugins.js
vendored
10
dist/smartsass.plugins.js
vendored
@ -1,10 +0,0 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
require("typings-global");
|
||||
const sass = require("node-sass");
|
||||
exports.sass = sass;
|
||||
const smartfile = require("smartfile");
|
||||
exports.smartfile = smartfile;
|
||||
const smartq = require("smartq");
|
||||
exports.smartq = smartq;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnRzYXNzLnBsdWdpbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHNhc3MucGx1Z2lucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLDBCQUF1QjtBQUN2QixrQ0FBaUM7QUFLL0Isb0JBQUk7QUFKTix1Q0FBc0M7QUFLcEMsOEJBQVM7QUFKWCxpQ0FBZ0M7QUFLOUIsd0JBQU0ifQ==
|
16
npmextra.json
Normal file
16
npmextra.json
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"npmci": {
|
||||
"npmGlobalTools": [],
|
||||
"npmAccessLevel": "public"
|
||||
},
|
||||
"gitzone": {
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "pushrocks",
|
||||
"gitrepo": "smartsass",
|
||||
"shortDescription": "smart wrapper for sass",
|
||||
"npmPackagename": "@pushrocks/smartsass",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
2697
package-lock.json
generated
Normal file
2697
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
package.json
39
package.json
@ -1,11 +1,13 @@
|
||||
{
|
||||
"name": "smartsass",
|
||||
"version": "1.0.2",
|
||||
"name": "@pushrocks/smartsass",
|
||||
"version": "2.0.6",
|
||||
"private": false,
|
||||
"description": "smart wrapper for sass",
|
||||
"main": "dist/index.js",
|
||||
"typings": "dist/index.d.ts",
|
||||
"scripts": {
|
||||
"test": "(npmts)"
|
||||
"test": "(tstest test/)",
|
||||
"build": "(tsbuild)"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -23,10 +25,29 @@
|
||||
},
|
||||
"homepage": "https://gitlab.com/pushrocks/smartsass#README",
|
||||
"dependencies": {
|
||||
"@types/node-sass": "^3.10.32",
|
||||
"node-sass": "^4.5.0",
|
||||
"smartfile": "^4.1.7",
|
||||
"smartq": "^1.1.1",
|
||||
"typings-global": "^1.0.14"
|
||||
}
|
||||
"@pushrocks/smartfile": "^7.0.6",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@types/node-sass": "^4.11.0",
|
||||
"node-sass": "^4.13.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.17",
|
||||
"@gitzone/tsrun": "^1.2.8",
|
||||
"@gitzone/tstest": "^1.0.28",
|
||||
"@pushrocks/tapbundle": "^3.2.0",
|
||||
"@types/node": "^13.1.6",
|
||||
"tslint": "^5.20.1",
|
||||
"tslint-config-prettier": "^1.18.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
"ts_web/**/*",
|
||||
"dist/**/*",
|
||||
"dist_web/**/*",
|
||||
"dist_ts_web/**/*",
|
||||
"assets/**/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
|
0
test/test.scss
Normal file
0
test/test.scss
Normal file
12
test/test.ts
Normal file
12
test/test.ts
Normal file
@ -0,0 +1,12 @@
|
||||
import { tap, expect } from '@pushrocks/tapbundle';
|
||||
|
||||
import * as smartsass from '../ts/index';
|
||||
|
||||
tap.test('should create a valid instance of smartsass', async () => {
|
||||
const testsmartSass = new smartsass.Smartsass({
|
||||
data: 'hello'
|
||||
});
|
||||
expect(testsmartSass).to.be.instanceof(smartsass.Smartsass);
|
||||
});
|
||||
|
||||
tap.start();
|
56
ts/index.ts
56
ts/index.ts
@ -1,40 +1,64 @@
|
||||
import * as plugins from './smartsass.plugins'
|
||||
import * as plugins from './smartsass.plugins';
|
||||
|
||||
// interfaces
|
||||
import { Result } from 'node-sass'
|
||||
import { Result } from 'node-sass';
|
||||
|
||||
export interface ISmartsassConstructorOptions {
|
||||
entryFilePath: string
|
||||
data?: string;
|
||||
entryFilePath?: string;
|
||||
includePaths?: string[];
|
||||
}
|
||||
|
||||
export class Smartsass {
|
||||
entryFilePath: string
|
||||
includePaths = [];
|
||||
entryFilePath: string;
|
||||
data: string;
|
||||
constructor(optionsArg: ISmartsassConstructorOptions) {
|
||||
this.entryFilePath = optionsArg.entryFilePath
|
||||
this.entryFilePath = optionsArg.entryFilePath;
|
||||
this.data = optionsArg.data;
|
||||
if (optionsArg.includePaths) {
|
||||
for (let includePath of optionsArg.includePaths) {
|
||||
this.includePaths.push(includePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* add further include paths
|
||||
*/
|
||||
addIncludePaths(includePathsArray: string[]) {
|
||||
for (let includePath of includePathsArray) {
|
||||
this.includePaths.push(includePath);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* renders the Smartsass classes' entryfile and returns result as string
|
||||
*/
|
||||
render() {
|
||||
let done = plugins.smartq.defer<plugins.sass.Result>()
|
||||
plugins.sass.render({
|
||||
file: this.entryFilePath
|
||||
}, function (err, result) {
|
||||
let done = plugins.smartpromise.defer<plugins.sass.Result>();
|
||||
plugins.sass.render(
|
||||
{
|
||||
data: this.data,
|
||||
file: this.entryFilePath,
|
||||
includePaths: this.includePaths
|
||||
},
|
||||
function(err, result) {
|
||||
if (err) {
|
||||
console.log(err)
|
||||
done.reject(err)
|
||||
console.log(err);
|
||||
done.reject(err);
|
||||
}
|
||||
done.resolve(result)
|
||||
})
|
||||
return done.promise
|
||||
done.resolve(result);
|
||||
}
|
||||
);
|
||||
return done.promise;
|
||||
}
|
||||
|
||||
/**
|
||||
* renders and stores
|
||||
*/
|
||||
async renderAndStore(outputFilePath: string) {
|
||||
let result = await this.render()
|
||||
await plugins.smartfile.memory.toFs(result.css.toString(), outputFilePath)
|
||||
let result = await this.render();
|
||||
await plugins.smartfile.memory.toFs(result.css.toString(), outputFilePath);
|
||||
}
|
||||
}
|
||||
|
1
ts/smartsass.includes.ts
Normal file
1
ts/smartsass.includes.ts
Normal file
@ -0,0 +1 @@
|
||||
import * as plugins from './smartsass.plugins';
|
@ -1,10 +1,5 @@
|
||||
import 'typings-global'
|
||||
import * as sass from 'node-sass'
|
||||
import * as smartfile from 'smartfile'
|
||||
import * as smartq from 'smartq'
|
||||
import * as sass from 'node-sass';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
export {
|
||||
sass,
|
||||
smartfile,
|
||||
smartq
|
||||
}
|
||||
export { sass, smartfile, smartpromise };
|
||||
|
16
tslint.json
16
tslint.json
@ -1,3 +1,17 @@
|
||||
{
|
||||
"extends": "tslint-config-standard"
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
||||
|
Reference in New Issue
Block a user