-
Notifications
You must be signed in to change notification settings - Fork 1
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 #10 from ashblue/feature/move-to-typescript
feat: package now overwrites target files instead of creating a copy
- Loading branch information
Showing
24 changed files
with
32,404 additions
and
3,709 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Editor configuration, see http://editorconfig.org | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false |
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,45 @@ | ||
module.exports = { | ||
env: { | ||
browser: true, | ||
commonjs: true, | ||
es2021: true, | ||
jest: true, | ||
}, | ||
extends: [ | ||
'airbnb-base', | ||
"eslint:recommended", | ||
"plugin:@typescript-eslint/recommended", | ||
"plugin:@typescript-eslint/recommended-requiring-type-checking", | ||
], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
ecmaVersion: 12, | ||
project: './tsconfig.json', | ||
}, | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.jsx', '.ts', '.tsx'], | ||
}, | ||
}, | ||
}, | ||
plugins: [ | ||
'@typescript-eslint', | ||
], | ||
rules: { | ||
'import/extensions': 'off', | ||
'no-console': 'off', | ||
'no-underscore-dangle': 'off', | ||
'no-useless-constructor': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['src/**/*.test.ts'], | ||
rules: { | ||
'@typescript-eslint/no-unsafe-return': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-unsafe-assignment': 'off', | ||
} | ||
} | ||
] | ||
}; |
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 |
---|---|---|
|
@@ -90,3 +90,4 @@ typings/ | |
# Project specific | ||
tmp | ||
.idea | ||
dist/ |
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 @@ | ||
_ |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npx --no-install commitlint --edit $1 |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run test:coverage |
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 @@ | ||
v14.16.0 |
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,10 @@ | ||
{ | ||
"plugins": [ | ||
"@semantic-release/commit-analyzer", | ||
"@semantic-release/release-notes-generator", | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/git", | ||
"@semantic-release/github" | ||
] | ||
} |
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,9 @@ | ||
language: node_js | ||
install: | ||
- npm install | ||
script: | ||
- commitlint-travis | ||
- npm run lint | ||
- npm run test:coverage | ||
- npm run build | ||
- npm run semantic-release |
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,24 +1,53 @@ | ||
# UPM Package Populator | ||
|
||
A helper library to cross populate nested Unity packages in a project with NPM data. | ||
A helper library to cross populate nested Unity package details such as README.md, CHANGELOG.md, package.json, and more. | ||
|
||
Installation | ||
## Getting Started | ||
|
||
```bash | ||
npm i -D upm-package-populator | ||
npm install upm-package-populator | ||
``` | ||
|
||
Example usage | ||
|
||
```javascript | ||
const createDist = require('upm-package-populator'); | ||
|
||
createDist( | ||
// Nested Unity package location | ||
'Assets/FluidBehaviorTree', | ||
|
||
// Root folder | ||
'.', | ||
|
||
// Where the files will be output. Dumps a zip with the folder name | ||
'dist'); | ||
const { populatePackage } = require('upm-package-populator'); | ||
|
||
populatePackage( | ||
// The folder to copy files from | ||
'./src', | ||
|
||
// Where to overwrite files | ||
'./target', | ||
); | ||
``` | ||
|
||
## Development | ||
|
||
### Making Commits | ||
|
||
To make a commit you must use Commitizen. To do so use the following to trigger the commit wizard. | ||
|
||
``` | ||
npm run commit | ||
``` | ||
|
||
### Testing The Package Locally | ||
|
||
In this package's root run the following to link the package locally to NPM's node module directory. | ||
|
||
```bash | ||
npm link | ||
``` | ||
|
||
Navigate to the root of the project you want to test the package in. Then run this. It will build a link to the local project on your mahcine. | ||
|
||
```bash | ||
npm link upm-package-populator | ||
``` | ||
|
||
It's a good idea to unlink a package when you're done. **Navigate back to this project's root folder** and run the following to unlink. This should clean out any local reference data, which prevents any conflicts with packages. | ||
|
||
```bash | ||
npm unlink upm-package-populator | ||
``` |
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 @@ | ||
module.exports = {extends: ['@commitlint/config-conventional']}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,26 @@ | ||
module.exports = { | ||
clearMocks: true, | ||
collectCoverageFrom: [ | ||
'src/**/*', | ||
], | ||
coverageDirectory: "coverage", | ||
coverageThreshold: { | ||
global: { | ||
branches: 100, | ||
functions: 100, | ||
lines: 100, | ||
statements: 100, | ||
} | ||
}, | ||
moduleFileExtensions: [ | ||
"js", | ||
"ts", | ||
], | ||
testEnvironment: "node", | ||
testMatch: [ | ||
"**/*.test.ts", | ||
], | ||
transform: { | ||
'\\.ts$': 'ts-jest', | ||
}, | ||
}; |
Oops, something went wrong.