This repository has been archived by the owner on May 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor code to be more modular and add passing tests (#18)
*makefile * refactor tests * remove unnecessary logs * add root dir to tests and npm link to docker file * refactor symlink * Refactor symlink code with tests (#24) * Add CircleCI & codecov (#20) * add node 4 & 6 in circle * add codecov * add codecov badge * Add Linter (#21)
- Loading branch information
1 parent
9c31d40
commit 1d87da4
Showing
90 changed files
with
32,730 additions
and
277 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,110 @@ | ||
version: 2 | ||
|
||
step-library: | ||
- &install-node-4 | ||
run: | ||
name: Install node | ||
command: | | ||
set +e | ||
curl -o- https://github.com/raw/creationix/nvm/v0.33.8/install.sh | bash | ||
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh" | ||
nvm install v4 | ||
nvm alias default v4 | ||
echo "[ -s \"${NVM_DIR}/nvm.sh\" ] && . \"${NVM_DIR}/nvm.sh\"" >> $BASH_ENV | ||
- &install-node-6 | ||
run: | ||
name: Install node | ||
command: | | ||
set +e | ||
curl -o- https://github.com/raw/creationix/nvm/v0.33.8/install.sh | bash | ||
[ -s "${NVM_DIR}/nvm.sh" ] && \. "${NVM_DIR}/nvm.sh" | ||
nvm install v6 | ||
nvm alias default v6 | ||
echo "[ -s \"${NVM_DIR}/nvm.sh\" ] && . \"${NVM_DIR}/nvm.sh\"" >> $BASH_ENV | ||
- &build-and-test | ||
run: | ||
name: Build and test | ||
command: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
node -v | ||
npm -v | ||
npm install | ||
npm link | ||
npm test | ||
- &build-and-test-codecov | ||
run: | ||
name: Build and test | ||
command: | | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc | ||
node -v | ||
npm -v | ||
npm install | ||
npm link | ||
npm run report-coverage | ||
jobs: | ||
build-osx-node-4: | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- checkout | ||
- run: echo 'export NVM_DIR=${HOME}/.nvm' >> $BASH_ENV | ||
- *install-node-4 | ||
- *build-and-test-codecov | ||
|
||
build-osx-node-6: | ||
macos: | ||
xcode: "9.0" | ||
steps: | ||
- checkout | ||
- run: echo 'export NVM_DIR=${HOME}/.nvm' >> $BASH_ENV | ||
- *install-node-6 | ||
- *build-and-test | ||
|
||
build-linux-docker-node-4: | ||
docker: | ||
- image: ubuntu:trusty | ||
steps: | ||
- checkout | ||
- run: | ||
name: libstdc++ upgrade | ||
command: | | ||
apt-get update -y | ||
apt-get install -y software-properties-common python-software-properties || true | ||
add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
apt-get update -y | ||
apt-get install -y libstdc++6 curl bash git | ||
- run: echo 'export NVM_DIR=/opt/circleci/.nvm' >> $BASH_ENV | ||
- *install-node-4 | ||
- *build-and-test | ||
|
||
build-linux-docker-node-6: | ||
docker: | ||
- image: ubuntu:trusty | ||
steps: | ||
- checkout | ||
- run: | ||
name: libstdc++ upgrade | ||
command: | | ||
apt-get update -y | ||
apt-get install -y software-properties-common python-software-properties || true | ||
add-apt-repository -y ppa:ubuntu-toolchain-r/test | ||
apt-get update -y | ||
apt-get install -y libstdc++6 curl bash git | ||
- run: echo 'export NVM_DIR=/opt/circleci/.nvm' >> $BASH_ENV | ||
- *install-node-6 | ||
- *build-and-test | ||
|
||
workflows: | ||
version: 2 | ||
build-and-deploy: | ||
jobs: | ||
- build-osx-node-4 | ||
- build-osx-node-6 | ||
- build-linux-docker-node-4 | ||
- build-linux-docker-node-6 |
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 @@ | ||
{ | ||
"rules": { | ||
"indent": [2, 2], | ||
"quotes": [2, "single", { "allowTemplateLiterals": true }], | ||
"no-console": [0], | ||
"semi": [2, "always"], | ||
}, | ||
"env": { | ||
"node": true, | ||
"es6": true | ||
}, | ||
"globals": { | ||
"process": true, | ||
"module": true, | ||
"require": true | ||
}, | ||
"extends": "eslint:recommended" | ||
} |
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
.env | ||
.test-env | ||
mason_packages/ | ||
mason.ini | ||
include/ | ||
mason-versions.ini | ||
.nyc_output/ | ||
coverage.lcov | ||
|
||
|
||
notes.txt |
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,21 @@ | ||
SHELL = /bin/bash | ||
|
||
build: | ||
docker build \ | ||
--build-arg NPMAccessToken="${NPMAccessToken}" \ | ||
--tag mason-js:latest . | ||
|
||
bash: | ||
docker run \ | ||
-it mason-js:latest bash | ||
|
||
run: build | ||
docker run \ | ||
-it mason-js:latest | ||
|
||
test: build | ||
docker run \ | ||
--tty \ | ||
--rm \ | ||
mason-js:latest \ | ||
npm 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# mason-js | ||
[![Build status](https://ci.appveyor.com/api/projects/status/ri4jpnad6fbhfna5?svg=true)](https://ci.appveyor.com/project/Mapbox/mason-js) | ||
|
||
[![codecov](https://codecov.io/gh/mapbox/mason-js/branch/master/graph/badge.svg)](https://codecov.io/gh/mapbox/mason-js) | ||
|
||
A Javascript client for Mason | ||
|
||
|
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,19 @@ | ||
Usage: | ||
mason-js install | ||
|
||
or | ||
|
||
mason-js install <package> <package type> | ||
|
||
Description: | ||
mason-js is a JS client for mason that installs c++ packages locally (both header-only and compiled). mason-js can install all packages declared in a mason-versions.ini file or it can install a single package. | ||
|
||
Example: | ||
mason-js install | ||
|
||
OR | ||
|
||
mason-js install protozero=1.5.1 --type=header | ||
|
||
Options: | ||
--type [header or compiled] |
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
Oops, something went wrong.