tools and utilities used for builds and develop sketch7 (ssv) libraries. includes sharing of the following configs:
.eslintrc
.stylelintrc
tslint.json
tsconfig.json
In order to contribute please read the Contribution guidelines.
Quick links
Change logs | Project Repository | Contribution guidelines
Get library via npm
npm install @ssv/tools --save
import { compileTsc, rollup } from "@ssv/tools";
// compile typescript - execute typescript with cli
compileTsc({
module: "es2015",
configPath: "./tsconfig.build.json",
continueOnError: args.continueOnError
});
// rollup - execute rollup with cli
rollup({ continueOnError: args.continueOnError });
// prepare for prepublish, as copy files such as `README.md`, `CHANGELOG.md`, copy and transform `package.json`
buildResources();
// prepare release build such as update version placeholder
prepareReleaseBuild();
import { setGulpContext, registerGulpMultiTargetBuilds } from "@ssv/tools";
import gulp from "gulp";
// before geting started with gulp utils, you need to invoke this once in order to share same instance of gulp.
setGulpContext(gulp)
// generates and register task for gulp by convention for multi-targetting build e.g. amd, umd, es2015 etc...
// e.g. compile:styles (all) | compile:styles:dev (dev target) | compile:styles:TARGET etc... (compile:styles:es2015).
registerGulpMultiTargetBuilds({
taskName: "html",
action: compileHtml,
config: {
buildTargets: [
"es2015",
"amd",
"umd"
],
devTarget: "amd",
}
});
for usage with es5, use as following:
const ssvTools = require("@ssv/tools");
ssvTools.compileTsc(...);
{
"extends": "./node_modules/@ssv/tools/config/.eslintrc"
}
{
"extends": [
"./node_modules/@ssv/tools/config/tslint.json"
]
}
{
"extends": "./node_modules/@ssv/tools/config/tsconfig.json"
}
{
"extends": "./node_modules/@ssv/tools/config/.stylelintrc"
}
Install/setup the following:
- NodeJS v18+
- Visual Studio Code or similar code editor
- TypeScript 5.0+
- Git + SourceTree, SmartGit or similar (optional)
- Ensure to install global NPM modules using the following:
npm install -g git gulp
- Run
git clone https://github.com/sketch7/ssv-tools.git
The following process need to be executed in order to get started.
npm install
npm run build