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

fix: ensure app build and tslint processes run prior in the build gate #132

Merged
merged 15 commits into from
Mar 27, 2018
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jspm_packages/

# Typescript v1 declaration files
typings/
!packages/fast-browser-extensions/typings

# Optional npm cache directory
.npm
Expand Down
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ install:
- npm install
- lerna bootstrap
script:
- lerna run build
- npm test
- lerna run test
- npm run tslint
dist: trusty
sudo: false
24 changes: 23 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,26 @@ Aspects of our open source policy have been influenced and in some cases copied
* [Project Governance @Node] : https://nodejs.org/en/about/governance/
* [Contributions @Node] : https://github.com/nodejs/node/blob/master/CONTRIBUTING.md
* [Open Source @Github] : https://github.com/blog/2039-adopting-the-open-code-of-conduct
* [Open Source exmaples @todogroup] : https://github.com/todogroup/policies
* [Open Source exmaples @todogroup] : https://github.com/todogroup/policies

## Development workflow
Clone the repository, `cd` into the project, install [Lerna](https://github.com/lerna/lerna) and install dependencies:

```shell
git clone https://github.com/Microsoft/fast-dna.git
cd fast-dna
npm install --global lerna
npm install
```

Install all Lerna dependencies:
```shell
lerna bootstrap
```

Each package in FAST-DNA has its own unique requirements and commands, but the following commands are relatively standard across all packages:
- `npm run tslint` or `npm run tslint:fix` runs tslint on all typescript in the project.
- `npm run unit-tests` runs all unit-tests.
- `npm run test` runs all processes required to pass prior to check-in. Generally includes building, linting, and unit-testing.

To run these processes across *all* projects, substitute `lerna` for `npm`. eg, `lerna run test`.
14 changes: 0 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@ Details are located [here](https://github.com/Microsoft/fast-dna/blob/master/COD
### Accessibility
FAST-DNA has partnered with Deque & Microsoft to build accessibility into our components ensuring we are WCAG 2.0 AA compliant. [Readme](https://github.com/Microsoft/fast-dna/wiki/Accessibility)

## Getting started
Clone the repository, `cd` into the project, and install [Lerna](https://github.com/lerna/lerna):

```shell
git clone https://github.com/Microsoft/fast-dna.git
cd fast-dna
npm install --global lerna
```

Install all Lerna dependencies:
```shell
lerna bootstrap
```

## Contact
* Submit [for help](https://stackoverflow.com/questions/tagged/fast-dna)
* Submit [feature requests](https://github.com/Microsoft/fast-dna/issues/new?labels=feature%20:%20request)
Expand Down
14 changes: 6 additions & 8 deletions build/glyphs/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@ import * as path from "path";
import * as fs from "fs";

describe("Glyph string conversion", () => {
const glyphFolderPath: string = path.resolve(__dirname, "./__tests__/");
afterAll(() => {
fs.unlinkSync(`${glyphFolderPath}/index.js`);
fs.unlinkSync(`${glyphFolderPath}/index.ts`);
fs.unlinkSync(`${glyphFolderPath}/test-folder/index.js`);
});
it("should generate a file in a default location", () => {
const glyphFolderPath: string = path.resolve(__dirname, "./__tests__/");
const glyphConverter: ConvertGlyphs = new ConvertGlyphs(({glyphFolderPath} as IConvertGlyphOptions));
Expand All @@ -18,17 +24,13 @@ describe("Glyph string conversion", () => {
const glyphFolderPath: string = path.resolve(__dirname, "./__tests__/");
const indexFileDestination: string = path.resolve(__dirname, "./__tests__/test-folder/");
const glyphConverter: ConvertGlyphs = new ConvertGlyphs(({glyphFolderPath, indexFileDestination} as IConvertGlyphOptions));

fs.unlink(`${glyphFolderPath}/test-folder/index.js`, (err: Error) => { if (err) { throw err; } });
});
it("should have declared variables and exported strings", () => {
const glyphFolderPath: string = path.resolve(__dirname, "./__tests__/");
const glyphConverter: ConvertGlyphs = new ConvertGlyphs(({glyphFolderPath} as IConvertGlyphOptions));

expect(glyphConverter.getIndexFileContents().match(/const/g).length).toEqual(6);
expect(glyphConverter.getIndexFileContents().match(/export/g).length).toEqual(6);

fs.unlink(`${glyphFolderPath}/index.js`, (err: Error) => { if (err) { throw err; } });
});
it("should generate strings in a specified format", () => {
const glyphFolderPath: string = path.resolve(__dirname, "./__tests__/");
Expand All @@ -37,13 +39,9 @@ describe("Glyph string conversion", () => {
expect(
glyphConverter.getIndexFileContents().match(/const\s[a-z|A-Z]+\s=\s`.*`;\nexport\s{\s.*\s}/g).length
).toEqual(6);

fs.unlink(`${glyphFolderPath}/index.js`, (err: Error) => { if (err) { throw err; } });
});
it("should generate a file with a .js or .ts extension", () => {
const glyphFolderPath: string = path.resolve(__dirname, "./__tests__/");
const glyphConverter: ConvertGlyphs = new ConvertGlyphs(({glyphFolderPath, indexFileType: "ts"} as IConvertGlyphOptions));

fs.unlink(`${glyphFolderPath}/index.ts`, (err: Error) => { if (err) { throw err; } });
});
});
41 changes: 0 additions & 41 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
"readme": "README.md",
"scripts": {
"test": "jest",
"tslint": "tslint -c ./tslint.json \"**/*.ts\" \"**/*.tsx\"",
"tslint:fix": "tslint -c ./tslint.json --fix \"**/*.ts\" \"**/*.tsx\"",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
},
"jest": {
Expand Down Expand Up @@ -44,7 +42,6 @@
"rimraf": "^2.6.2",
"ts-jest": "^22.4.2",
"ts-node": "^5.0.1",
"tslint": "^5.9.1",
"typescript": "^2.7.2",
"yargs": "^11.0.0"
}
Expand Down
13 changes: 0 additions & 13 deletions packages/fast-animation/.eslintrc

This file was deleted.

Loading