Setup a new dacore module
npm install -g @dacore/build-tools
will install this module globally so you can access the dacore
command in the command line
dacore init
will create npm links to you're previously installed workspace setup (no documentation for that yet!)
tsconfig
create tsconfig.json
:
{
"compilerOptions": {
"module": "commonjs",
"sourceMap": true,
"target": "es6",
"outDir": "lib",
"declaration": true,
"jsx":"react",
"types": [
]
},
"files": [
"./src/index.ts"
],
"include" : [
"./node_modules/@dacore/core/builds/dacore.core.d.ts"
]
}
and tsconfig-es5.json
{
"compilerOptions": {
"module": "commonjs",
"sourceMap": true,
"target": "ES5",
"jsx":"react",
"lib": ["es2017", "dom"],//required to make core-js work, however there are some issues with this, as it potentially ignores warning for targets you don't support. Hence be careful to only use core-js features that you know are specifically included in @dacore/core or @dacore/browser-core-es5
"types": [
]
},
"files": [
"./src/index.ts"
],
"include" : [
"./src/definitions/jison.d.ts",
"./node_modules/@dacore/core/builds/dacore.core.d.ts"
]
}
Please do not be tempted to create a symbolic link to your local development version of this package. It will cause trouble, for example when creating new modules.
If you must, remember to undo it after development.
To upgrade to the latest version run `
yarn upgrade @dacore/build-tools --latest