Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Merge pull request #2 from strongloop/project-setup
Browse files Browse the repository at this point in the history
Project setup
  • Loading branch information
virkt25 authored Nov 9, 2017
2 parents dee9ce0 + 512ac0c commit a3e360d
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
dist6
node_modules
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist
dist6
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
sudo: false
language: node_js
node_js:
- "6"
- "8"

branches:
only:
- master
16 changes: 16 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
environment:
matrix:
- nodejs_version: "6"
- nodejs_version: "8"

install:
- ps: Install-Product node $env:nodejs_version
- npm install

test_script:
- node --version
- npm --version
- npm test

build: off
skip_branch_with_pr: true
6 changes: 6 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-example-log-extension
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

export * from './dist';
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-example-log-extension
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

const nodeMajorVersion = +process.versions.node.split('.')[0];
const dist = nodeMajorVersion >= 7 ? './dist' : './dist6';
module.exports = require(dist);
6 changes: 6 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-example-log-extension
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

// export * from './src';
41 changes: 41 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "loopback4-example-log-extension",
"version": "1.0.0",
"description": "An example extension project for LoopBack Next",
"main": "index.js",
"scripts": {
"build": "lb-tsc",
"build:watch": "lb-tsc --watch",
"clean": "lb-clean",
"lint": "npm run prettier:check && npm run tslint",
"lint:fix": "npm run prettier:fix && npm run tslint",
"prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"",
"prettier:check": "npm run prettier:cli -- -l",
"prettier:fix": "npm run prettier:cli -- --write",
"tslint": "lb-tslint",
"tslint:fix": "npm run tslint -- --fix",
"prepare": "npm run build",
"pretest": "npm run clean && npm run build",
"test": "lb-dist mocha DIST/test",
"posttest": "npm run lint"
},
"repository": {
"type": "git",
"url": "git+https://github.com/strongloop/loopback4-example-log-extension.git"
},
"keywords": [
"loopback4",
"lb4ext",
"typescript",
"loopback-extension"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/strongloop/loopback4-example-log-extension/issues"
},
"homepage": "https://github.com/strongloop/loopback4-example-log-extension#readme",
"devDependencies": {
"@loopback/build": "^4.0.0-alpha.3",
"@loopback/testlab": "^4.0.0-alpha.13"
}
}
12 changes: 12 additions & 0 deletions test/smoke.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Copyright IBM Corp. 2017. All Rights Reserved.
// Node module: loopback4-example-log-extension
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT

import {expect} from '@loopback/testlab';

describe('Smoke test to verify project setup - remove me later', () => {
it('works', () => {
expect(true).to.equal(true);
});
});
3 changes: 3 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "./node_modules/@loopback/build/config/tsconfig.common.json"
}

0 comments on commit a3e360d

Please sign in to comment.