Skip to content

Commit

Permalink
feat: add win support
Browse files Browse the repository at this point in the history
  • Loading branch information
antongolub committed Sep 26, 2020
1 parent 3322978 commit 3266eb1
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 26 deletions.
72 changes: 49 additions & 23 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
language: node_js
node_js:
- '12'

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
jobs:
include:
- stage: build
os: linux
node_js: 14
before_install:
- npm install -g nyc
- npm install -g mocha
install: yarn
script: skip
workspaces:
create:
name: shared
paths:
- node_modules
- target
- typings
- flow-typed
- docs

after_script:
- ./cc-test-reporter format-coverage -t lcov ./coverage/lcov.info
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
- &test
stage: test
os: linux
install: skip
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- npm run test:report
after_script:
- ./cc-test-reporter format-coverage -t lcov ./coverage/lcov.info
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
workspaces:
use: shared
- <<: *test
os: windows
node_js: 14
env: YARN_GPG=no
install: yarn
before_script: skip
script: yarn test
after_script: skip

install:
- yarn cache clean
- yarn

script:
- yarn run build
- chmod -R 777 target
- yarn test:report

deploy:
provider: script
skip_cleanup: true
script:
- npx semantic-release
- stage: release
if: branch = master AND type != pull_request
node_js: 14
workspaces:
use: shared
install: skip
script: yarn release
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"docs": "typedoc --readme README.md --tsconfig tsconfig.json src/main --ignoreCompilerErrors && touch ./docs/.nojekyll || exit 0",
"uglify": "for f in $(find target -name '*.js'); do short=${f%.js}; terser -c -m -o $short.js -- $f; done",
"postupdate": "yarn && npx yarn-audit-fix && yarn build && yarn test",
"publish:beta": "npm publish --no-git-tag-version --tag beta"
"publish:beta": "npm publish --no-git-tag-version --tag beta",
"release": "semantic-release"
},
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/main/ts/libdefkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ export const normalize: IExecPipe = (flags: ICliFlags) => {
const cache = findCacheDir({name: '@qiwi/libdefkit'}) + ''
const name = fs.readJsonSync(join(cwd, 'package.json')).name
const entry = flags.entry ?? `${name}/target/es5`
const dtsOut = flags.dtsOut ?? join(cwd, 'typings/index.d.ts')
const flowOut = flags.flowOut ?? join(cwd, 'flow-typed/index.flow.js')
const dtsOut = flags.dtsOut ?? join(cwd, 'typings', 'index.d.ts')
const flowOut = flags.flowOut ?? join(cwd, 'flow-typed', 'index.flow.js')

return {...flags, cache, cwd, name, entry, dtsOut, flowOut}
}
Expand Down

0 comments on commit 3266eb1

Please sign in to comment.