-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from openimis/feature/OMT_202_2020_technical_up…
…date Feature/omt 202 2020 technical update
- Loading branch information
Showing
4 changed files
with
94 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
{ | ||
"presets": [ | ||
["env", { | ||
["@babel/preset-env", { | ||
"modules": false | ||
}], | ||
"stage-0", | ||
"react" | ||
["@babel/preset-react"] | ||
], | ||
"plugins": [ | ||
"@babel/plugin-transform-runtime", | ||
"@babel/plugin-proposal-class-properties" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
|
||
name: Node.js Package | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- run: yarn install | ||
- run: yarn build | ||
|
||
publish-npm: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
scope: openimis | ||
- run: yarn install | ||
- run: yarn build | ||
- run: npm publish --access public | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
|
||
publish-gpr: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://npm.pkg.github.com/ | ||
- run: yarn install | ||
- run: yarn build | ||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
import babel from 'rollup-plugin-babel' | ||
import commonjs from 'rollup-plugin-commonjs' | ||
import external from 'rollup-plugin-peer-deps-external' | ||
import postcss from 'rollup-plugin-postcss' | ||
import resolve from 'rollup-plugin-node-resolve' | ||
import url from 'rollup-plugin-url' | ||
import json from 'rollup-plugin-json' | ||
import svgr from '@svgr/rollup' | ||
|
||
import babel from '@rollup/plugin-babel' | ||
import json from '@rollup/plugin-json' | ||
import pkg from './package.json' | ||
|
||
export default { | ||
input: 'src/index.js', | ||
output: [ | ||
{ | ||
file: pkg.main, | ||
format: 'cjs', | ||
file: pkg.module, | ||
format: 'es', | ||
sourcemap: true | ||
}, | ||
{ | ||
file: pkg.module, | ||
format: 'es', | ||
file: 'dist/index.js', | ||
format: 'cjs', | ||
sourcemap: true | ||
} | ||
], | ||
external: [ | ||
/^@babel.*/, | ||
/^@date-io\/.*/, | ||
/^@material-ui\/.*/, | ||
/^@openimis.*/, | ||
"classnames", | ||
"clsx", | ||
"history", | ||
/^lodash.*/, | ||
"moment", | ||
"prop-types", | ||
/^react.*/, | ||
/^redux.*/ | ||
], | ||
plugins: [ | ||
json(), | ||
external(), | ||
postcss({ | ||
modules: true | ||
}), | ||
url(), | ||
svgr(), | ||
babel({ | ||
exclude: 'node_modules/**', | ||
plugins: [ 'external-helpers' ] | ||
babelHelpers: 'runtime' | ||
}), | ||
resolve(), | ||
commonjs() | ||
] | ||
} | ||
} |