mentie 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -45
- package/modules/environment.js +1 -1
- package/package.json +1 -1
- package/.npmrc.bak +0 -1
package/README.md
CHANGED
|
@@ -1,46 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Mentie
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Quickstart
|
|
6
|
-
|
|
7
|
-
```shell
|
|
8
|
-
# Install dependencies
|
|
9
|
-
npm install -D airier @babel/eslint-parser @babel/preset-react eslint eslint-plugin-react eslint-plugin-unused-imports husky
|
|
10
|
-
mkdir .vscode .husky || echo "Directories already exist"
|
|
11
|
-
|
|
12
|
-
# Create scripts
|
|
13
|
-
npm pkg set scripts.lint="eslint --fix src"
|
|
14
|
-
|
|
15
|
-
# Init husky
|
|
16
|
-
npx husky init
|
|
17
|
-
|
|
18
|
-
# Download files
|
|
19
|
-
curl https://raw.githubusercontent.com/actuallymentor/airier/main/.eslintrc.cjs --output .eslintrc.cjs
|
|
20
|
-
curl https://raw.githubusercontent.com/actuallymentor/airier/main/.vscode/settings.json --output .vscode/settings.json
|
|
21
|
-
curl https://raw.githubusercontent.com/actuallymentor/airier/main/.husky/pre-commit --output .husky/pre-commit
|
|
22
|
-
curl https://raw.githubusercontent.com/actuallymentor/airier/main/.babelrc --output .babelrc
|
|
23
|
-
|
|
24
|
-
# Add files to git
|
|
25
|
-
git add -f .eslintrc.cjs .babelrc .vscode/* .husky/*
|
|
26
|
-
|
|
27
|
-
# Make husky executable
|
|
28
|
-
chmod ug+x .husky/*
|
|
29
|
-
git add .husky/pre-commit
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Making changes
|
|
33
|
-
|
|
34
|
-
The relevant source files are in `modules/`. If you make a change, you can update the package by:
|
|
35
|
-
|
|
36
|
-
1. Making the changes
|
|
37
|
-
1. Updating the version number in `package.json`
|
|
38
|
-
1. Pushing to the main branch of the repo or opening a pull request. Changes are deployed and published through github actions. Publishing requires a version bump in `package.json`.
|
|
39
|
-
|
|
40
|
-
### Using this repo as a template
|
|
41
|
-
|
|
42
|
-
If you are cloning this repo and want to reuse it to create an npm package. These are the one-time setup instructions:
|
|
43
|
-
|
|
44
|
-
1. You need to do the one-time first publishing manually by running `npm publish --access public` in the root of the project. This will create the package on npmjs and allow you to create a granular token. This requires you to rename `.npmrc` to `.npmrc.bak` temporatily.
|
|
45
|
-
1. You need to obtain a NPM_ACCESS_TOKEN on npmjs (https://www.npmjs.com/settings/YOURUSERNAME/tokens/granular-access-tokens/new). Note that granular tokens expire!
|
|
46
|
-
# airier
|
|
3
|
+
Mentor's favorite helpers.
|
package/modules/environment.js
CHANGED
|
@@ -24,7 +24,7 @@ export const is_emulator = process.env.FUNCTIONS_EMULATOR === 'true'
|
|
|
24
24
|
// ///////////////////////////////
|
|
25
25
|
|
|
26
26
|
const node_dev = process.env.NODE_ENV === 'development'
|
|
27
|
-
const web_dev = typeof location !== 'undefined' && ( `${ location.href }`.includes( 'debug=true' ) || `${ location.href }`.includes( '
|
|
27
|
+
const web_dev = typeof location !== 'undefined' && ( `${ location.href }`.includes( 'debug=true' ) || `${ location.href }`.includes( 'localhost' ) )
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* Represents the development environment.
|
package/package.json
CHANGED
package/.npmrc.bak
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//registry.npmjs.org/:_authToken=${NPM_ACCESS_TOKEN}
|