Permalink
Browse files

hotfix: travis.yml

  • Loading branch information...
dleitee committed Mar 8, 2017
1 parent 155138b commit 6a48b569a5e90902e376f7a451368a54721d7312
Showing with 17 additions and 8 deletions.
  1. +15 −6 .travis.yml
  2. +2 −2 build/generate.js
View
@@ -1,16 +1,25 @@
language: node_js
node_js:
- "7"
before_script:
- 'npm install'
- echo "//registry.npmjs.org/:_authToken=${TOKEN_NPM}" > ~/.npmrc
- echo "//registry.npmjs.org/:_password=${PASSWORD_NPM}" > ~/.npmrc
- echo "//registry.npmjs.org/:username=dleitee" >> ~/.npmrc
- echo "//registry.npmjs.org/:email=dleitee@gmail.com" >> ~/.npmrc
- 'npm install'
master:
before_script:
- echo "//registry.npmjs.org/:_authToken=${TOKEN_NPM}" > ~/.npmrc
- echo "//registry.npmjs.org/:_password=${PASSWORD_NPM}" >> ~/.npmrc
- echo "//registry.npmjs.org/:username=dleitee" >> ~/.npmrc
- echo "//registry.npmjs.org/:email=dleitee@gmail.com" >> ~/.npmrc
script:
- npm run lint
- npm test
- npm run build
master:
script:
- npm run build
- npm publish
after_success:
- 'npm run coveralls'
View
@@ -13,7 +13,7 @@ import { getFileName } from './dependecies'
export default async (filename) => {
console.info(`Executing: ${filename}\n`)
const tmpDir = './tmp/'
const tmpDir = '/tmp/'
const workdir = fs.mkdtempSync(tmpDir)
const libname = filename.match(/[\w]+.js$/g)[0].replace('.js', '').toLowerCase()
const file = fs.readFileSync(filename, { encoding: 'UTF-8' })
@@ -36,7 +36,7 @@ export default async (filename) => {
fs.writeFileSync(`${workdir}/package.json`, library.package, options)
fs.writeFileSync(`${workdir}/readme.md`, library.readme, options)
await exec(`cd ${workdir} && npm publish ./`, (error, stdout, stderr) => {
await exec(`cd ${workdir} && npm publish`, (error, stdout, stderr) => {
console.info(filename)
if (error) {
console.error(`exec error: ${error}`)

0 comments on commit 6a48b56

Please sign in to comment.