Skip to content

Commit

Permalink
chore: move to new repo template
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Dec 2, 2024
1 parent 6e5589e commit c15b7cb
Show file tree
Hide file tree
Showing 56 changed files with 18,732 additions and 5,756 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
extends: './tools/.eslintrc.js'
};
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [farfromrefug]
112 changes: 112 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
name: 'release'

on:
workflow_dispatch:
inputs:
release_type:
type: choice
default: auto
description: What kind of version upgrade
options:
- auto
- patch
- minor
- major

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: "0"
submodules: true

- name: setup node
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'


- uses: oNaiPs/secrets-to-env-action@v1
with:
secrets: ${{ toJSON(secrets) }}


- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
token: '${{ secrets.GITHUB_TOKEN }}'
name: Martin Guillon
email: [email protected]

- name: install jq
run: sudo apt install jq

- name: Enable CorePack
run: |
corepack enable
yarn config get globalFolder # the yarn command will ensure the correct yarn version is downloaded and installed
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get globalFolder)"

- name: Remove package.json resolutions
run: echo "`jq 'delpaths([["resolutions"]])' package.json`" > package.json

- uses: actions/cache@v4
name: Handle node_modules Cache
id: yarn-node_modules # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: node_modules
key: ${{ runner.os }}-yarn-node_modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node_modules-
- uses: actions/cache@v4
if: steps.yarn-node_modules.outputs.cache-hit != 'true'
name: Handle Yarn cache
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install deps
if: steps.yarn-node_modules.outputs.cache-hit != 'true'
uses: bahmutov/npm-install@v1
with:
install-command: yarn install --silent
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false

- name: run setup
run: |
npm run setup
- name: "NPM Identity"
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- name: publish auto
if: github.event.inputs.release_type == 'auto'
run: |
npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: publish
if: github.event.inputs.release_type != 'auto'
run: |
npm run publish -- --force-publish --no-verify-access --no-private --no-commit-hooks --yes --bump ${{ github.event.inputs.release_type }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101 changes: 59 additions & 42 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,63 @@
# Demo application build files
demo/platforms/*
demo/lib/*

*.DS_Store

src/*.js
/*.js
demo/app/**.js
demo/node_modules/
# NativeScript
hooks/
node_modules/
package-lock.json
platforms

.vscode
.idea
demo/.DS_Store
demo/app/.DS_Store
.DS_Store
.npmrc
*.js
# NativeScript Template
*.js.map
!ngcc.config.js
!webpack.config.js

# Logs
logs
*.log
src/*.d.ts
!src/index.d.ts
!src/references.d.ts
!src/scripts/*.js
!seed-tests/*.js
seed-tests/seed-copy/**/*.*
seed-tests/seed-copy-new-git-repo/**/*.*
!demo/karma.conf.js
!demo/app/tests/*.js
demo/*.d.ts
!demo/references.d.ts
demo/lib
demo/platforms
node_modules
publish/src
publish/package
demo/report/report.html
demo/report/stats.json
!demo/webpack.config.js
!demo-ng/webpack.config.js
*.aar
/pnpm-lock.yaml
plugin/*.d.ts
plugin/**/*.d.ts
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# General
.DS_Store
.AppleDouble
.LSOverride
.idea
.cloud
.gradle
.project
.yarn
.cxx
tmp/

!.eslintrc.js
!.prettierrc.js

!e2e/*.js
!detox.config.js
devices.js

*.framework
*.xcframework
**/*.js.map
src/**/*.js
packages/**/*.js
packages/**/*.d.ts
bin
build
Pods
!packages/*/platforms
/packages/**/*.aar
/packages/**/*.framework
/packages/**/*.xcframework
/demo-snippets/**/*.aar
*.xcuserdatad
/packages/README.md
packages/**/*js.map
packages/**/*js
packages/angular
packages/typings
packages/**/angular/*.json
packages/**/*.ngsummary.json
packages/**/*.metadata.json

.vscode/settings.json

/blueprint.md
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "demo-ng"]
path = demo-ng
url = https://github.com/nativescript-community/plugin-seed-demo-ng.git
[submodule "tools"]
path = tools
url = https://github.com/nativescript-community/plugin-seed-tools.git
11 changes: 11 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
shamefully-hoist=true
public-hoist-pattern[]=*eslint*
public-hoist-pattern[]=source-map-support
public-hoist-pattern[]=ts-patch
public-hoist-pattern[]=typescript
public-hoist-pattern[]=cpy-cli
strict-peer-dependencies=false
shell-emulator=true
auto-install-peers=false
loglevel=error
engine-strict=true
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package-lock.json
node_modules/
plugin/
docs/
7 changes: 7 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
printWidth: 200,
semi: true,
tabWidth: 4,
trailingComma: 'none',
singleQuote: true
};
7 changes: 7 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
compressionLevel: mixed

nmHoistingLimits: workspaces

nodeLinker: node-modules

yarnPath: tools/.yarn/releases/yarn-4.0.1.cjs
Loading

0 comments on commit c15b7cb

Please sign in to comment.