This repository has been archived by the owner on Sep 30, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix linting
- Loading branch information
Showing
15 changed files
with
15,909 additions
and
2,120 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,59 @@ | ||
# Use the latest 2.1 version of CircleCI pipeline processing engine, see https://circleci.com/docs/2.0/configuration-reference/ | ||
version: 2.1 | ||
|
||
executors: | ||
node10-browsers: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
|
||
jobs: | ||
setup: | ||
executor: node10-browsers | ||
steps: | ||
- checkout | ||
- run: mkdir -p /tmp/workspace | ||
- run: make clean-dependencies | ||
- run: make deps | ||
- run: npm run lint | ||
- run: cp -R src conf node_modules test package.json /tmp/workspace | ||
- persist_to_workspace: | ||
root: /tmp/workspace | ||
paths: | ||
- src | ||
- node_modules | ||
- test | ||
- conf | ||
- package.json | ||
test-node: | ||
executor: node10-browsers | ||
steps: | ||
- attach_workspace: | ||
at: ./ | ||
- run: npm run test:node | ||
test-browser: | ||
executor: node10-browsers | ||
steps: | ||
- attach_workspace: | ||
at: ./ | ||
- run: npm run test:browser | ||
build: | ||
executor: node10-browsers | ||
steps: | ||
- attach_workspace: | ||
at: ./ | ||
- run: npm run build | ||
|
||
workflows: | ||
version: 2 | ||
Tests: | ||
jobs: | ||
- setup | ||
- test-node: | ||
requires: | ||
- setup | ||
- test-browser: | ||
requires: | ||
- setup | ||
- build: | ||
requires: | ||
- setup |
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,2 +1,4 @@ | ||
*sublime* | ||
node_modules/ | ||
test/browser/bundle.js | ||
test/browser/bundle.js.map |
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,7 @@ | ||
*sublime* | ||
node_modules/ | ||
dist/*.min.js.map | ||
test | ||
conf | ||
Makefile | ||
.circleci |
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 @@ | ||
all: build | ||
|
||
deps: clean | ||
npm install | ||
|
||
test: deps | ||
npm run test | ||
|
||
build: test | ||
npm run build | ||
@echo "Build success!" | ||
# cp dist/orbit-db-store.min.js dist/orbit-db-keystore.min.js.map examples/browser | ||
@echo "Built: 'dist/', 'examples/browser/'" | ||
|
||
clean: | ||
rm -rf ipfs/ | ||
rm -rf keystore/ | ||
|
||
clean-dependencies: clean | ||
rm -f package-lock.json | ||
rm -rf node_modules/ | ||
|
||
rebuild: | clean-dependencies build | ||
|
||
.PHONY: 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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
|
||
module.exports = { | ||
entry: './src/Store.js', | ||
output: { | ||
libraryTarget: 'var', | ||
library: 'Store', | ||
filename: 'orbit-db-store.min.js' | ||
}, | ||
target: 'web', | ||
mode: 'production', | ||
devtool: 'sourcemap', | ||
node: { | ||
console: false, | ||
Buffer: true | ||
}, | ||
plugins: [ | ||
], | ||
resolve: { | ||
modules: [ | ||
'node_modules', | ||
path.resolve(__dirname, '../node_modules') | ||
] | ||
}, | ||
resolveLoader: { | ||
modules: [ | ||
'node_modules', | ||
path.resolve(__dirname, '../node_modules') | ||
], | ||
moduleExtensions: ['-loader'] | ||
} | ||
} |
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,75 @@ | ||
'use strict' | ||
|
||
const glob = require('glob') | ||
const webpack = require('webpack') | ||
const path = require('path') | ||
|
||
module.exports = { | ||
// TODO: put all tests in a .js file that webpack can use as entry point | ||
entry: glob.sync('./test/*.spec.js'), | ||
output: { | ||
filename: '../test/browser/bundle.js' | ||
}, | ||
target: 'web', | ||
mode: 'production', | ||
devtool: 'source-map', | ||
node: { | ||
child_process: 'empty' | ||
}, | ||
plugins: [ | ||
new webpack.DefinePlugin({ | ||
'process.env': { | ||
NODE_ENV: JSON.stringify(process.env.NODE_ENV) | ||
} | ||
}), | ||
new webpack.IgnorePlugin(/mongo|redis/) | ||
], | ||
externals: { | ||
fs: '{}', | ||
fatfs: '{}', | ||
runtimejs: '{}', | ||
// net: '{}', | ||
// tls: '{}', | ||
rimraf: '{ sync: () => {} }', | ||
'graceful-fs': '{}', | ||
'fs-extra': '{ copy: () => {} }', | ||
'fs.realpath': '{}' | ||
// 'child_process': {}, | ||
// dns: '{}', | ||
// "node-gyp-build": '{}' | ||
}, | ||
resolve: { | ||
modules: [ | ||
'node_modules', | ||
path.resolve(__dirname, '../node_modules') | ||
] | ||
}, | ||
resolveLoader: { | ||
modules: [ | ||
'node_modules', | ||
path.resolve(__dirname, '../node_modules') | ||
], | ||
moduleExtensions: ['-loader'] | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.js$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: 'babel-loader', | ||
options: { | ||
presets: [ | ||
['@babel/preset-env', { modules: false }] | ||
], | ||
plugins: ['@babel/syntax-object-rest-spread', '@babel/transform-runtime', '@babel/plugin-transform-modules-commonjs'] | ||
} | ||
} | ||
}, | ||
{ | ||
test: /signing|getPublic$/, | ||
loader: 'json-loader' | ||
} | ||
] | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.