forked from team-innovation/vue-sfc-rollup
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Showing
14 changed files
with
155 additions
and
50 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 |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/components | ||
.idea | ||
.DS_Store | ||
v-test |
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
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
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
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
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
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 |
---|---|---|
|
@@ -15,12 +15,12 @@ after_script: | |
- ./notify.sh | ||
cache: yarn | ||
deploy: | ||
- provider: pages | ||
local-dir: docs | ||
- provider: pages # you may delete this provider if you don't need deployment of github pages | ||
local-dir: docs # https://docs.travis-ci.com/user/deployment/packagecloud/#specify-package-folder | ||
github-token: $GITHUB_TOKEN | ||
skip-cleanup: true | ||
keep-history: true | ||
- provider: npm | ||
email: [email protected] | ||
email: [email protected] # use your own email | ||
api_key: $NPM_TOKEN | ||
skip-cleanup: 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
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
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
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,31 @@ | ||
// Modified from sindresorhus/pupa | ||
|
||
module.exports = (template, data) => { | ||
if (typeof template !== 'string') { | ||
throw new TypeError( | ||
`Expected a \`string\` in the first argument, got \`${typeof template}\`` | ||
) | ||
} | ||
|
||
if (typeof data !== 'object') { | ||
throw new TypeError( | ||
`Expected an \`object\` or \`Array\` in the second argument, got \`${typeof data}\`` | ||
) | ||
} | ||
|
||
const doubleBraceRegex = /{{(.*?)}}/g | ||
|
||
if (doubleBraceRegex.test(template)) { | ||
template = template.replace(doubleBraceRegex, (_, key) => { | ||
let result = data | ||
|
||
for (const property of key.split('.')) { | ||
result = result ? result[property] : '' | ||
} | ||
|
||
return String(result) | ||
}) | ||
} | ||
|
||
return template | ||
} |
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,39 @@ | ||
const fs = require('fs-extra') | ||
const path = require('path') | ||
|
||
const shellFiles = [ | ||
'build.sh', | ||
'netlify.sh', | ||
'notify.sh' | ||
] | ||
|
||
exports.todoFiles = [ | ||
{ | ||
fileName: 'build.sh', | ||
msg: 'Please check `yarn build` in `build.sh`' | ||
}, | ||
{ | ||
fileName: '.travis.yml', | ||
msg: 'Please check `deploy` in `.travis.yml`' | ||
}, | ||
{ | ||
fileName: 'netlify.sh', | ||
msg: 'Please check `yarn doc` in `netlify.sh`(you can delete this file if you don\'t need it)' | ||
}, | ||
] | ||
|
||
exports.shouldUpdateFiles = [ | ||
'.grenrc.js', | ||
'.prettierrc', | ||
'.stylelintrc', | ||
'.travis.yml', | ||
...shellFiles | ||
] | ||
|
||
exports.setShellFilePermission = dir => { | ||
shellFiles.forEach(shellFile => { | ||
fs.chmodSync(path.join(dir, shellFile), '755') | ||
fs.chmodSync(path.join(dir, shellFile), '755') | ||
fs.chmodSync(path.join(dir, shellFile), '755') | ||
}) | ||
} |
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