diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..5827a85 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +*.css +*.scss \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b132461 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "npm" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "weekly" + day: "wednesday" + versioning-strategy: increase diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3c0512b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +name: Build + +on: [push, pull_request] + +env: + CI: true + +jobs: + build: + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + node-version: [14.x, 15.x] + experimental: [false] + include: + - node: 16.x + experimental: true + steps: + - uses: actions/checkout@v2 + - name: Use Node.js (NPMJS) ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + run: sudo npm ci + - name: Build + run: npm run build:prod + - name: Code coverage reporting + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./js-coverage/lcov.info \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..e7f9aa9 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,81 @@ +name: Publish +on: + release: + types: + - created +env: + CI: true +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14.x] + steps: + - uses: actions/checkout@v2 + - name: Get the version + id: get_version + run: echo "RELEASE_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV + - name: Release version + run: | + echo $RELEASE_VERSION + echo ${{ env.RELEASE_VERSION }} + - name: Use Node.js (NPMJS) ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + always-auth: true + registry-url: 'https://registry.npmjs.org' + env: + NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} + - name: Install dependencies + run: npm ci + - name: Build + run: npm run build:prod --if-present + - name: Publish NPMJS @fdmg + if: contains(github.ref, 'canary') == false + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} + continue-on-error: true + - name: Publish NPMJS @fdmg (canary) + if: contains(github.ref, 'canary') + run: npm publish --tag next + env: + NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} + continue-on-error: true + - name: Use specific package.json for GHP + run: cp ./dist/package.github.json ./dist/package.json + - name: Publish NPMJS @fdmediagroep + if: contains(github.ref, 'canary') == false + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} + continue-on-error: true + - name: Publish NPMJS @fdmediagroep (canary) + if: contains(github.ref, 'canary') + run: npm publish --tag next + env: + NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}} + continue-on-error: true + - name: Use Node.js (GitHub) ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + always-auth: true + registry-url: 'https://npm.pkg.github.com' + scope: '@FDMediagroep' + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish GPR + if: contains(github.ref, 'canary') == false + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true + - name: Publish GPR (canary) + if: contains(github.ref, 'canary') + run: npm publish --tag next + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + continue-on-error: true + \ No newline at end of file diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..374d602 --- /dev/null +++ b/.npmignore @@ -0,0 +1,5 @@ +.github +src +*.d.ts +tsconfig.json +webpack.config.js \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..ad30bfe --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +*.yml \ No newline at end of file