Skip to content

Commit b560249

Browse files
johannesspohrbirkir
authored andcommitted
fix: make dev environment run on windows (#271)
* fix: make build compatible with windows * fix: make build compatible with windows * fix: make build compatible with windows * fix: add .gitattributes to check out lf on windows * fix: include dotenv for core tests * fix: prettier calls now use double quotes (single quotes do not work on windows)
1 parent 753617b commit b560249

15 files changed

Lines changed: 39 additions & 24 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
"node": ">= 10.*"
55
},
66
"scripts": {
7-
"setup": "lerna bootstrap; yarn run link",
7+
"setup": "lerna bootstrap && yarn run link",
88
"start": "lerna run dev --stream",
99
"link": "lerna exec -- yarn link",
1010
"unlink": "lerna exec -- yarn unlink",
11-
"clean": "lerna run clean; rimraf {.cache,node_modules,reports,packages/**/{node_modules,lib,build,coverage},yarn.lock}",
11+
"clean": "lerna run clean && rimraf {.cache,node_modules,reports,packages/**/{node_modules,lib,build,coverage},yarn.lock}",
1212
"compile": "lerna run compile",
1313
"lint": "tslint ./packages/*/{src,__tests__}/*.{ts,tsx}",
14-
"lint:ci": "mkdir -p reports/junit; yarn lint --formatters-dir node_modules/tslint-junit-formatter/formatters --format junit -o ./reports/junit/tslint.xml",
14+
"lint:ci": "mkdir -p reports/junit && yarn lint --formatters-dir node_modules/tslint-junit-formatter/formatters --format junit -o ./reports/junit/tslint.xml",
1515
"publish": "lerna publish prerelease",
1616
"publish:canary": "lerna publish --canary",
1717
"test": "yarn lint && yarn compile && yarn coverage && yarn test:prettier",
1818
"testonly": "lerna run testonly",
19-
"prettier": "prettier --write '**/*.{json,md,js,jsx,ts,tsx}'",
20-
"test:prettier": "prettier --list-different '**/*.{json,md,js,jsx,ts,tsx}'",
19+
"prettier": "prettier --write \"**/*.{json,md,js,jsx,ts,tsx}\"",
20+
"test:prettier": "prettier --list-different \"**/*.{json,md,js,jsx,ts,tsx}\"",
2121
"coverage": "lerna run coverage",
2222
"coverage:ci": "lerna run coverage -- --ci --reporters=default --reporters=jest-junit",
2323
"codecov": "codecov",
24-
"reset": "yarn clean; yarn install; yarn setup; yarn compile",
24+
"reset": "yarn clean && yarn install && yarn setup && yarn compile",
2525
"docs": "typedoc --readme none --mode modules --out docs/api --ignoreCompilerErrors --excludeExternals --external-modulemap \".*(packages/[^/]+)/.*\" --logger none --name \"Prime CMS\" ./packages"
2626
},
2727
"workspaces": {

packages/prime-core/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@
1919
"coveragePathIgnorePatterns": [
2020
"/node_modules/",
2121
"/__tests__/utils"
22-
]
22+
],
23+
"setupFiles": ["dotenv/config"]
2324
},
2425
"scripts": {
2526
"clean": "rimraf lib",
2627
"start": "node lib/index.js",
2728
"prepublishOnly": "yarn compile",
28-
"compile": "rm -rf ./lib && tsc -p .",
29-
"dev": "DEBUG=prime* ts-node-dev --no-notify --transpileOnly src",
30-
"dev:debug": "DEBUG=prime:*,typeorm:* ts-node-dev --no-notify --transpileOnly --inspect -- src",
29+
"compile": "rimraf lib && tsc -p .",
30+
"dev": "cross-env DEBUG=prime* ts-node-dev --no-notify --transpileOnly src",
31+
"dev:debug": "cross-env DEBUG=prime:*,typeorm:* ts-node-dev --no-notify --transpileOnly --inspect -- src",
3132
"testonly": "jest --runInBand",
3233
"test:watch": "jest --watch",
3334
"coverage": "yarn testonly --coverage"
@@ -82,6 +83,7 @@
8283
"@types/graphql": "14.2.2",
8384
"@types/lodash": "4.14.135",
8485
"@types/rc": "1.1.0",
86+
"cross-env": "^5.2.0",
8587
"ts-node": "8.0.2",
8688
"ts-node-dev": "1.0.0-pre.39"
8789
},

packages/prime-field-asset/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

packages/prime-field-boolean/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

packages/prime-field-datetime/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

packages/prime-field-document/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

packages/prime-field-geopoint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

packages/prime-field-group/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

packages/prime-field-number/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"clean": "rimraf lib",
2020
"start": "tsc --watch",
2121
"precompile": "yarn clean",
22-
"compile": "tsc; rimraf lib/ui; webpack --config ../prime-tools/webpack.config.js",
22+
"compile": "tsc && rimraf lib/ui && webpack --config ../prime-tools/webpack.config.js",
2323
"prepublishOnly": "yarn compile",
2424
"testonly": "jest --runInBand",
2525
"test:watch": "jest --watch",

0 commit comments

Comments
 (0)