-
Notifications
You must be signed in to change notification settings - Fork 0
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
0 parents
commit 1834f63
Showing
22 changed files
with
8,088 additions
and
0 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,17 @@ | ||
# @overlook/plugin-build module | ||
# Editor config | ||
|
||
root = true | ||
|
||
[*] | ||
indent_style = tab | ||
indent_size = 2 | ||
|
||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{json,yml,md}] | ||
indent_style = space | ||
indent_size = 2 |
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,2 @@ | ||
!.* | ||
coverage |
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,26 @@ | ||
/* -------------------- | ||
* @overlook/plugin-build module | ||
* ESLint config | ||
* ------------------*/ | ||
|
||
'use strict'; | ||
|
||
// Exports | ||
|
||
module.exports = { | ||
extends: [ | ||
'@overlookmotel/eslint-config', | ||
'@overlookmotel/eslint-config-node' | ||
], | ||
overrides: [{ | ||
files: ['es/**/*.js'], | ||
parserOptions: { | ||
sourceType: 'module' | ||
}, | ||
rules: { | ||
// Disable rules which produce false errors | ||
'node/no-unsupported-features/es-syntax': ['error', {ignores: ['modules']}], | ||
'node/no-unpublished-import': ['off'] | ||
} | ||
}] | ||
}; |
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,2 @@ | ||
# Auto detect text files and perform LF normalization | ||
* text=auto |
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,3 @@ | ||
.DS_Store | ||
node_modules | ||
coverage |
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,24 @@ | ||
language: node_js | ||
|
||
script: | ||
- "npm run ci" | ||
|
||
node_js: | ||
- "14" | ||
- "13" | ||
- "12" | ||
- "10" | ||
|
||
branches: | ||
except: | ||
- /^v\d+\./ | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
- node_js: "14" | ||
env: COVERAGE=true | ||
allow_failures: | ||
- env: COVERAGE=true | ||
|
||
cache: npm |
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 @@ | ||
Copyright (c) 2020 Overlook Motel (theoverlookmotel@gmail.com) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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,41 @@ | ||
[![NPM version](https://img.shields.io/npm/v/@overlook/plugin-build.svg)](https://www.npmjs.com/package/@overlook/plugin-build) | ||
[![Build Status](https://img.shields.io/travis/overlookjs/plugin-build/master.svg)](http://travis-ci.org/overlookjs/plugin-build) | ||
[![Dependency Status](https://img.shields.io/david/overlookjs/plugin-build.svg)](https://david-dm.org/overlookjs/plugin-build) | ||
[![Dev dependency Status](https://img.shields.io/david/dev/overlookjs/plugin-build.svg)](https://david-dm.org/overlookjs/plugin-build) | ||
[![Greenkeeper badge](https://badges.greenkeeper.io/overlookjs/plugin-build.svg)](https://greenkeeper.io/) | ||
[![Coverage Status](https://img.shields.io/coveralls/overlookjs/plugin-build/master.svg)](https://coveralls.io/r/overlookjs/plugin-build) | ||
|
||
# Overlook framework build plugin | ||
|
||
Part of the [Overlook framework](https://overlookjs.github.io/). | ||
|
||
## Usage | ||
|
||
This module is under development and not ready for use yet. | ||
|
||
## Versioning | ||
|
||
This module follows [semver](https://semver.org/). Breaking changes will only be made in major version updates. | ||
|
||
All active NodeJS release lines are supported (v10+ at time of writing). After a release line of NodeJS reaches end of life according to [Node's LTS schedule](https://nodejs.org/en/about/releases/), support for that version of Node may be dropped at any time, and this will not be considered a breaking change. Dropping support for a Node version will be made in a minor version update (e.g. 1.2.0 to 1.3.0). If you are using a Node version which is approaching end of life, pin your dependency of this module to patch updates only using tilde (`~`) e.g. `~1.2.3` to avoid breakages. | ||
|
||
## Tests | ||
|
||
Use `npm test` to run the tests. Use `npm run cover` to check coverage. | ||
|
||
## Changelog | ||
|
||
See [changelog.md](https://github.com/overlookjs/plugin-build/blob/master/changelog.md) | ||
|
||
## Issues | ||
|
||
If you discover a bug, please raise an issue on Github. https://github.com/overlookjs/plugin-build/issues | ||
|
||
## Contribution | ||
|
||
Pull requests are very welcome. Please: | ||
|
||
* ensure all tests pass before submitting PR | ||
* add tests for new features | ||
* document new functionality/API additions in README | ||
* do not add an entry to Changelog (Changelog is created when cutting releases) |
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,5 @@ | ||
# Changelog | ||
|
||
## Next | ||
|
||
* Initial release |
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,14 @@ | ||
/* -------------------- | ||
* @overlook/plugin-build module | ||
* ESM entry point | ||
* Re-export CJS with named exports | ||
* ------------------*/ | ||
|
||
// Exports | ||
|
||
import buildPlugin from '../lib/index.js'; | ||
|
||
export default buildPlugin; | ||
export const { | ||
TEMP | ||
} = buildPlugin; |
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,3 @@ | ||
{ | ||
"type": "module" | ||
} |
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,10 @@ | ||
/* -------------------- | ||
* @overlook/plugin-build module | ||
* CJS entry point | ||
* ------------------*/ | ||
|
||
'use strict'; | ||
|
||
// Exports | ||
|
||
module.exports = require('./lib/index.js'); |
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,26 @@ | ||
/* -------------------- | ||
* @overlook/plugin-build module | ||
* Jest config | ||
* ------------------*/ | ||
|
||
'use strict'; | ||
|
||
// Modules | ||
const parseNodeVersion = require('parse-node-version'); | ||
|
||
// Exports | ||
|
||
const supportsEsm = parseNodeVersion(process.version).major >= 13; | ||
|
||
module.exports = { | ||
testEnvironment: 'node', | ||
coverageDirectory: 'coverage', | ||
collectCoverageFrom: ['index.js', 'lib/**/*.js', 'es/**/*.js'], | ||
setupFilesAfterEnv: ['jest-extended'], | ||
moduleNameMapper: { | ||
'^@overlook/plugin-build($|/.*)': '<rootDir>$1' | ||
}, | ||
testMatch: ['**/__tests__/**/*.?(m)js', '**/?(*.)+(spec|test).?(m)js'], | ||
...(supportsEsm ? {moduleFileExtensions: ['js', 'mjs']} : null), | ||
transform: {} | ||
}; |
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,29 @@ | ||
/* -------------------- | ||
* @overlook/plugin-build module | ||
* Entry point | ||
* ------------------*/ | ||
|
||
'use strict'; | ||
|
||
// Modules | ||
const Plugin = require('@overlook/plugin'); | ||
|
||
// Imports | ||
const pkg = require('../package.json'); | ||
|
||
// Exports | ||
|
||
const buildPlugin = new Plugin( | ||
pkg, | ||
{symbols: ['TEMP']}, | ||
extend | ||
); | ||
|
||
module.exports = buildPlugin; | ||
|
||
const {TEMP} = buildPlugin; // eslint-disable-line no-unused-vars | ||
|
||
function extend(Route) { | ||
return class BuildRoute extends Route { | ||
}; | ||
} |
Oops, something went wrong.