Skip to content

Commit

Permalink
Merge pull request #125 from marp-team/update-dependencies
Browse files Browse the repository at this point in the history
Upgrade dependent packages to the latest version
  • Loading branch information
yhatt authored Jul 9, 2019
2 parents 3ca8a6c + 583a67b commit d25e429
Show file tree
Hide file tree
Showing 6 changed files with 491 additions and 512 deletions.
4 changes: 3 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,10 @@ jobs:
command: yarn build:standalone

- run:
name: Create packages
name: Create packages (for Linux and macOS)
command: yarn standalone:pack
environment:
TARGET: linux,mac

- persist_to_workspace:
root: dist
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
### Changed

- Rename bespoke option arguments using dot notation ([#122](https://github.com/marp-team/marp-cli/pull/122))
- Upgrade dependent packages to the latest version ([#125](https://github.com/marp-team/marp-cli/pull/125))

### Deprecated

Expand Down
104 changes: 68 additions & 36 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,69 @@
trigger:
- master

pool:
vmImage: 'vs2017-win2016'

steps:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '10.16.0'

- script: yarn install
displayName: yarn install

- script: yarn audit
displayName: yarn audit

- script: yarn test:coverage --ci -i --reporters=default --reporters=jest-junit
displayName: Jest

- script: yarn codecov
displayName: Codecov
env:
CODECOV_TOKEN: $(codecovToken)

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: 'junit.xml'
branches:
include:
- master
tags:
include:
- v*

jobs:
- job: test
pool:
vmImage: 'vs2017-win2016'
steps:
- task: NodeTool@0
displayName: Install Node.js
inputs:
versionSpec: '10.16.0'

- script: yarn install
displayName: yarn install

- script: yarn audit
displayName: yarn audit

- script: yarn test:coverage --ci -i --reporters=default --reporters=jest-junit
displayName: Jest

- script: yarn codecov
displayName: Codecov
env:
CODECOV_TOKEN: $(codecovToken)

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/coverage'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: 'junit.xml'

- job: release
condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/v')
pool:
vmImage: 'vs2017-win2016'
steps:
- task: NodeTool@0
displayName: Install Node.js
inputs:
versionSpec: '10.16.0'

- script: yarn install
displayName: yarn install

- script: yarn build:standalone
displayName: Build and create standalone binaries

- script: yarn standalone:pack
displayName: Create package for Windows
env:
TARGET: win

- script: yarn standalone:upload
displayName: Upload created package to the asset of GitHub release
env:
GITHUB_TOKEN: $(githubToken)
30 changes: 15 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@
},
"devDependencies": {
"@octokit/rest": "^16.28.2",
"@types/cheerio": "^0.22.11",
"@types/cheerio": "^0.22.12",
"@types/cosmiconfig": "^5.0.3",
"@types/express": "^4.17.0",
"@types/jest": "^24.0.15",
"@types/jest-plugin-context": "^2.9.2",
"@types/node": "^12.0.10",
"@types/node": "^12.6.1",
"@types/pug": "^2.0.4",
"@types/puppeteer": "^1.12.4",
"@types/supertest": "^2.0.7",
"@types/supertest": "^2.0.8",
"@types/ws": "^6.0.1",
"@types/yargs": "^13.0.0",
"autoprefixer": "^9.6.0",
"autoprefixer": "^9.6.1",
"bespoke": "^1.1.0",
"bespoke-forms": "^1.0.0",
"cheerio": "^1.0.0-rc.3",
Expand All @@ -87,26 +87,26 @@
"jest-junit": "^6.4.0",
"jest-plugin-context": "^2.9.0",
"npm-run-all": "^4.1.5",
"pkg": "~4.3.8",
"pkg": "^4.4.0",
"postcss-url": "^8.0.0",
"prettier": "^1.18.2",
"pug": "^2.0.4",
"rimraf": "^2.6.3",
"rollup": "^1.16.2",
"rollup-plugin-commonjs": "^10.0.0",
"rollup": "^1.16.6",
"rollup-plugin-commonjs": "^10.0.1",
"rollup-plugin-json": "^4.0.0",
"rollup-plugin-node-resolve": "^5.0.4",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-postcss": "^2.0.3",
"rollup-plugin-pug": "^1.1.1",
"rollup-plugin-terser": "^5.0.0",
"rollup-plugin-terser": "^5.1.1",
"rollup-plugin-typescript": "^1.0.1",
"rollup-plugin-url": "^2.2.2",
"sass": "^1.21.0",
"sass": "^1.22.3",
"screenfull": "^4.2.0",
"stylelint": "^10.1.0",
"stylelint-config-prettier": "^5.2.0",
"stylelint-config-standard": "^18.3.0",
"stylelint-scss": "^3.8.0",
"stylelint-scss": "^3.9.0",
"supertest": "^4.0.2",
"tar-stream": "^2.1.0",
"ts-jest": "24.0.2",
Expand All @@ -115,7 +115,7 @@
"tslint": "^5.18.0",
"tslint-config-airbnb": "^5.11.1",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.5.2",
"typescript": "^3.5.3",
"yauzl": "^2.10.0",
"zip-stream": "^2.0.1"
},
Expand All @@ -125,12 +125,12 @@
"@marp-team/pptx": "^0.1.0",
"carlo": "^0.9.46",
"chalk": "^2.4.2",
"chokidar": "^3.0.1",
"chokidar": "^3.0.2",
"chrome-launcher": "^0.10.7",
"cosmiconfig": "^5.2.1",
"express": "^4.17.1",
"get-stdin": "^7.0.0",
"globby": "^10.0.0",
"globby": "^10.0.1",
"import-from": "^3.0.0",
"is-wsl": "^2.1.0",
"mkdirp": "^0.5.1",
Expand All @@ -142,7 +142,7 @@
"strip-ansi": "^5.2.0",
"tmp": "^0.1.0",
"wrap-ansi": "^6.0.0",
"ws": "^7.0.1",
"ws": "^7.1.0",
"yargs": "^13.2.4"
},
"publishConfig": {
Expand Down
49 changes: 28 additions & 21 deletions scripts/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ const bin = path.resolve(__dirname, '../bin')
const binaryName = 'marp'
const dist = path.resolve(__dirname, '../dist')
const prefix = `marp-cli-v${version}`
const target = (process.env.TARGET || 'linux,mac,win').toLowerCase()

const packToTarGz = binary => {
const pack = tar.pack()
Expand All @@ -27,30 +28,36 @@ rimraf.sync(dist)
fs.mkdirSync(dist)

// Create package for Linux (.tar.gz)
fs.readFile(path.resolve(bin, 'marp-cli-linux'), (err, buffer) => {
if (err) throw err

packToTarGz(buffer).pipe(
fs.createWriteStream(path.resolve(dist, `${prefix}-linux.tar.gz`))
)
})
if (target.includes('linux')) {
fs.readFile(path.resolve(bin, 'marp-cli-linux'), (err, buffer) => {
if (err) throw err

packToTarGz(buffer).pipe(
fs.createWriteStream(path.resolve(dist, `${prefix}-linux.tar.gz`))
)
})
}

// Create package for macOS (.tar.gz)
fs.readFile(path.resolve(bin, 'marp-cli-macos'), (err, buffer) => {
if (err) throw err

packToTarGz(buffer).pipe(
fs.createWriteStream(path.resolve(dist, `${prefix}-mac.tar.gz`))
)
})
if (target.includes('mac')) {
fs.readFile(path.resolve(bin, 'marp-cli-macos'), (err, buffer) => {
if (err) throw err

packToTarGz(buffer).pipe(
fs.createWriteStream(path.resolve(dist, `${prefix}-mac.tar.gz`))
)
})
}

// Create package for Windows (.zip)
fs.readFile(path.resolve(bin, 'marp-cli-win.exe'), (err, buffer) => {
if (err) throw err
if (target.includes('win')) {
fs.readFile(path.resolve(bin, 'marp-cli-win.exe'), (err, buffer) => {
if (err) throw err

const pack = new ZipStream()
const pack = new ZipStream()

pack.entry(buffer, { name: `${binaryName}.exe` })
pack.finalize()
pack.pipe(fs.createWriteStream(path.resolve(dist, `${prefix}-win.zip`)))
})
pack.entry(buffer, { name: `${binaryName}.exe` })
pack.finalize()
pack.pipe(fs.createWriteStream(path.resolve(dist, `${prefix}-win.zip`)))
})
}
Loading

0 comments on commit d25e429

Please sign in to comment.