Skip to content

Commit

Permalink
Move static out of src directory for all targets which simplifies bui…
Browse files Browse the repository at this point in the history
…ld process
  • Loading branch information
krzkaczor committed Apr 13, 2020
1 parent fdba433 commit b0e369c
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions packages/target-truffle-v4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"**/dist",
"dist/**",
"static/**",
"README.md",
"LICENSE"
],
Expand All @@ -18,7 +19,6 @@
"lint:fix": "yarn lint --fix",
"typecheck": "tsc --noEmit --incremental false --composite false && tsc --noEmit --incremental false --composite false -p tsconfig.types.json",
"clean": "rm -rf dist && rm -f tsconfig.build.tsbuildinfo",
"post-build": "cp -rf ./src/static ./dist/",
"test": "true",
"test:fix": "yarn lint:fix && yarn format:fix && yarn test && yarn typecheck"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v4/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Truffle extends TsGeneratorPlugin {
},
{
path: join(this.outDirAbs, 'types.d.ts'),
contents: readFileSync(join(__dirname, './static/types.d.ts'), 'utf-8'),
contents: readFileSync(join(__dirname, '../static/types.d.ts'), 'utf-8'),
},
]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v4/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "./tsconfig.json",
"include": ["src"],
"include": ["src", "static"],
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v4/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "test"],
"include": ["src", "test", "static"],
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true
Expand Down
4 changes: 2 additions & 2 deletions packages/target-truffle-v5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"**/dist",
"dist/**",
"static/**",
"README.md",
"LICENSE"
],
Expand All @@ -18,7 +19,6 @@
"lint:fix": "yarn lint --fix",
"typecheck": "tsc --noEmit --incremental false --composite false && tsc --noEmit --incremental false --composite false -p tsconfig.types.json",
"clean": "rm -rf dist && rm -f tsconfig.build.tsbuildinfo",
"post-build": "cp -rf ./src/static ./dist/",
"test": "true",
"test:fix": "yarn lint:fix && yarn format:fix && yarn test && yarn typecheck"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v5/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class Truffle extends TsGeneratorPlugin {
},
{
path: join(this.outDirAbs, 'types.d.ts'),
contents: readFileSync(join(__dirname, './static/types.d.ts'), 'utf-8'),
contents: readFileSync(join(__dirname, '../static/types.d.ts'), 'utf-8'),
},
]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/target-truffle-v5/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "test"],
"include": ["src", "test", "static"],
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true
Expand Down
4 changes: 2 additions & 2 deletions packages/target-web3-v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"files": [
"**/dist",
"dist/**",
"static/**",
"README.md",
"LICENSE"
],
Expand All @@ -19,7 +20,6 @@
"lint:fix": "yarn lint --fix",
"typecheck": "tsc --noEmit --incremental false --composite false && tsc --noEmit --incremental false --composite false -p tsconfig.types.json",
"clean": "rm -rf dist && rm -f tsconfig.build.tsbuildinfo",
"post-build": "cp -rf ./src/static ./dist/",
"generate-types": "../typechain/dist/cli/cli.js --target=`pwd`/dist/index.js --outDir ./types/ '../../contracts/compiled/*.abi'",
"test": "yarn generate-types && mocha --config ../../.mocharc.js",
"test:fix": "yarn lint:fix && yarn format:fix && yarn test && yarn typecheck"
Expand Down
2 changes: 1 addition & 1 deletion packages/target-web3-v1/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class Web3V1 extends TsGeneratorPlugin {
return [
{
path: join(this.outDirAbs, 'types.d.ts'),
contents: readFileSync(join(__dirname, './static/types.d.ts'), 'utf-8'),
contents: readFileSync(join(__dirname, '../static/types.d.ts'), 'utf-8'),
},
]
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/target-web3-v1/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "./tsconfig.json",
"include": ["src"],
"include": ["src", "static"],
"compilerOptions": {
"outDir": "dist",
"rootDir": "src"
Expand Down
2 changes: 1 addition & 1 deletion packages/target-web3-v1/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extends": "../../tsconfig.json",
"include": ["src", "test"],
"include": ["src", "test", "static"],
"compilerOptions": {
"esModuleInterop": true,
"skipLibCheck": true
Expand Down

0 comments on commit b0e369c

Please sign in to comment.