-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 781148a
Showing
26 changed files
with
16,291 additions
and
0 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,9 @@ | ||
node_modules | ||
|
||
dist_dev | ||
|
||
dist_prod | ||
|
||
firefox_dev | ||
|
||
market_packages |
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,18 @@ | ||
{ | ||
"vetur.format.defaultFormatter.html": "js-beautify-html", | ||
"vetur.format.defaultFormatter.js": "vscode-typescript", | ||
"vetur.format.defaultFormatterOptions": { | ||
"js-beautify-html": { | ||
"wrap_attributes": "force-aligned" | ||
} | ||
}, | ||
"editor.tabSize": 4, | ||
"editor.formatOnSave": true, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": true | ||
}, | ||
"prettier.eslintIntegration": true, | ||
"prettier.semi": false, | ||
"prettier.singleQuote": true, | ||
"javascript.format.insertSpaceBeforeFunctionParenthesis": true | ||
} |
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,21 @@ | ||
## How to Build for Development | ||
``` shell | ||
npm install | ||
npm run build | ||
``` | ||
The output directory is *firefox_dev* | ||
|
||
## How to Build for Production | ||
|
||
```shell | ||
npm install | ||
npm run build:prod | ||
``` | ||
|
||
The output directory is *dist_prod* and *market_packages* | ||
|
||
## Another | ||
|
||
Also you could visit the repository in GitHub | ||
|
||
[sheepzh/make-zero](https://github.com/sheepzh/make-zero) |
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,25 @@ | ||
/** | ||
* Resolve environment | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
const path = require('path') | ||
const fs = require('fs') | ||
module.exports = __dirname => { | ||
// Get the env | ||
const argv = process.argv | ||
let env = 'production' | ||
argv.filter(a => a.startsWith('--mode=')).map(a => a.substring(7)).forEach(a => env = a) | ||
|
||
// Read env variables | ||
const envVariableFileName = path.join(__dirname, `.env.${env}`) | ||
const data = '' | ||
try { | ||
data = fs.readFileSync(envVariableFileName, { encoding: 'utf8' }).replace(/\r\n/g, ',').replace(/\r/g, ',').replace(/\n/g, ',') | ||
} catch (e) { | ||
console.log('Environment variable file not found: ' + envVariableFileName) | ||
} | ||
const variables = {} | ||
data.split(',').filter(a => !!a.trim() && !a.startsWith('#')).map(item => { return item.split('=') }).forEach(item => { variables[item[0]] = item[1] }) | ||
return { env, variables } | ||
} |
Oops, something went wrong.