Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: diem-forms #13

Merged
merged 1 commit into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/diem-forms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This is a basic workflow to help you get started with Actions

name: CI diem-forms

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
paths:
- "packages/diem-forms/**"
pull_request:
branches: [main]
paths:
- "packages/diem-forms/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

defaults:
run:
working-directory: packages/diem-forms

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "15.x"

- run: npm ci
- run: npm run eslint --if-present
- run: npm run build --if-present

- name: Deploy to NPM
run: |
npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_TOKEN}}
npm publish --ignore-scripts --access public
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' )
49 changes: 49 additions & 0 deletions .github/workflows/diem-util.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# This is a basic workflow to help you get started with Actions

name: CI diem-util

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
paths:
- "packages/diem-util/**"
pull_request:
branches: [main]
paths:
- "packages/diem-util/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

defaults:
run:
working-directory: packages/diem-util

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: "15.x"

- run: npm ci
- run: npm run eslint --if-present
- run: npm run build --if-present

- name: Deploy to NPM
run: |
npm config set //registry.npmjs.org/:_authToken ${{secrets.NPM_TOKEN}}
npm publish --ignore-scripts --access public
if: github.event_name == 'push' && ( github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' )
5 changes: 5 additions & 0 deletions packages/diem-forms/.cfignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
node_modules/
src/
npm/
typings/
44 changes: 44 additions & 0 deletions packages/diem-forms/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
👋 Hi! This file was autogenerated by tslint-to-eslint-config.
https://github.com/typescript-eslint/tslint-to-eslint-config

It represents the closest reasonable ESLint configuration to this
project's original TSLint configuration.

We recommend eventually switching this configuration to extend from
the recommended rulesets in typescript-eslint.
https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md

Happy linting! 💖
*/
module.exports = {
env: {
browser: true,
node: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
sourceType: 'module',
createDefaultProgram: true,
},
plugins: [
'@typescript-eslint',
'@typescript-eslint/tslint',
'sonarjs',
'angular',
'prettier',
'import',
'jsdoc',
],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:sonarjs/recommended',
'prettier',
'./node_modules/@mydiem/diem-util/eslintrc-base.js',
],
};
34 changes: 34 additions & 0 deletions packages/diem-forms/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Node generated files
node_modules
npm-debug.log
# OS generated files
.DS_Store
Thumbs.db
npm
public
runtime
server
./server
src
# Ignored files
*.ts
!*.d.ts
.cfignore
.eslintrc.json
.travis.yml
.vscode
config.js
env.json
gulpfile.js
manifest*.*
newrelic.js
package.json
postcss.config.js
tsconfig-build.json
tslint.json
webpack.config.js
build.yaml
gulp.*
gulpfile.*
.prettierrc
.eslintrc.js
5 changes: 5 additions & 0 deletions packages/diem-forms/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"printWidth": 120,
"tabWidth": 4
}
12 changes: 12 additions & 0 deletions packages/diem-forms/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"eslint.enable": true,
"formatOnSave.on": true,
"formatOnSave.extensions": [
"*"
],
"pugbeautify.fillTab": false,
"pugbeautify.tabSize": 4,
"typescript.tsdk": "node_modules/typescript/lib",
"tslint.rulesDirectory": "node_modules/tslint-eslint-rules/dist/rules",
"tslint.configFile": "tslint.json"
}
13 changes: 13 additions & 0 deletions packages/diem-forms/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const gulp_1 = __importDefault(require("gulp"));
const gulp_shell_1 = __importDefault(require("gulp-shell"));
gulp_1.default.task('aot-ts', gulp_shell_1.default.task([
'aot-fixer-pug --src-path src/',
]));
gulp_1.default.task('default', () => {
gulp_1.default.watch('./src/**/*.pug', gulp_1.default.series('aot-ts'));
});
11 changes: 11 additions & 0 deletions packages/diem-forms/gulpfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import gulp from 'gulp';

import shell from 'gulp-shell';

gulp.task('aot-ts', shell.task([
'aot-fixer-pug --src-path src/',
]));

gulp.task('default', () => {
gulp.watch('./src/**/*.pug', gulp.series('aot-ts'));
});
Loading