Skip to content

Commit 4cea2f1

Browse files
[FSSDK-8740] Add script for windows (#843)
* Add script for windows * Remove postbuild * Add postbuild * Update postbuild to postbuild:win
1 parent bc51f5d commit 4cea2f1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/optimizely-sdk/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"typings": "dist/index.browser.d.ts",
1010
"scripts": {
1111
"clean": "rm -rf dist",
12+
"clean:win": "(if exist dist rd /s/q dist)",
1213
"lint": "tsc --noEmit && eslint 'lib/**/*.js' 'lib/**/*.ts'",
1314
"test": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register -r lib/tests/exit_on_unhandled_rejection.js 'lib/**/*.tests.ts' 'lib/**/*.tests.js' && jest",
1415
"posttest": "npm run lint",
@@ -18,10 +19,12 @@
1819
"test-karma-local": "karma start karma.local_chrome.bs.conf.js && npm run build-browser-umd && karma start karma.local_chrome.umd.conf.js",
1920
"prebuild": "npm run clean",
2021
"build": "rollup -c && cp dist/index.lite.d.ts dist/optimizely.lite.es.d.ts && cp dist/index.lite.d.ts dist/optimizely.lite.es.min.d.ts && cp dist/index.lite.d.ts dist/optimizely.lite.min.d.ts",
22+
"build:win": "rollup -c && type nul > dist/optimizely.lite.es.d.ts && type nul > dist/optimizely.lite.es.min.d.ts && type nul > dist/optimizely.lite.min.d.ts",
2123
"build-browser-umd": "rollup -c --config-umd",
2224
"coveralls": "nyc --reporter=lcov npm test",
2325
"prepare": "npm run build",
24-
"prepublishOnly": "npm test && npm run test-ci"
26+
"prepublishOnly": "npm test && npm run test-ci",
27+
"postbuild:win": "@powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.es.d.ts\" && @powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.es.min.d.ts\" && @powershell copy \"dist/index.lite.d.ts\" \"dist/optimizely.lite.min.d.ts\""
2528
},
2629
"repository": {
2730
"type": "git",

0 commit comments

Comments
 (0)