Skip to content

Commit

Permalink
Flatten produced node module
Browse files Browse the repository at this point in the history
  • Loading branch information
Tanya Romankova committed May 10, 2017
1 parent 09ab7f6 commit b89e353
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ node_modules
.idea
*.iml
build
release
.vscode
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
src/
test/
build/
release/
.travis.yml
*.bash
tsconfig.*
tslint.json
yarn.lock
.vscode
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,19 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

[Unreleased]: https://github.com/atomist/slack-messages/compare/0.3.1...HEAD
[Unreleased]: https://github.com/atomist/slack-messages/compare/0.4.0...HEAD

## [0.4.0] - 2017-05-10

[0.4.0]: https://github.com/atomist/slack-messages/compare/0.3.1...0.4.0

### Fixed
- **BREAKING** Flatten module structure. You will need to update your
import statements:

before: `import { ... } from "@atomist/slack-messages/build/src/RugMessages";`

after: `import { ... } from "@atomist/slack-messages/RugMessages";`

## [0.3.1] - 2017-05-10

Expand Down
12 changes: 12 additions & 0 deletions npm-publish.bash
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ function main() {
return 1
fi

msg "compiling release version of typescript"
if ! tsc -p tsconfig.release.json; then
err "typescript release compilation failed"
return 1
fi

msg "packaging module"
if ! cp release/* .; then
err "packaging module failed"
return 1
fi

# npm honors this
rm -f .gitignore

Expand Down
2 changes: 1 addition & 1 deletion src/SlackMessages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export interface ActionConfirmation {
dismiss_text?: string;
}

type ActionType = "button";
export type ActionType = "button";

export interface ButtonSpec {
text: string;
Expand Down
40 changes: 40 additions & 0 deletions tsconfig.release.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"isolatedModules": false,
"jsx": "react",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"declaration": true,
"noImplicitAny": false,
"noImplicitUseStrict": false,
"removeComments": false,
"noLib": false,
"preserveConstEnums": true,
"suppressImplicitAnyIndexErrors": true,
"outDir": "release",
"rootDir": "src",
"sourceMap": true
},
"include": [
"src/**/*"
],
"exclude": [
"node_modules",
"typings/browser",
"typings/browser.d.ts"
],
"compileOnSave": false,
"buildOnSave": false,
"atom": {
"rewriteTsconfig": false
},
"typeRoots": [
"./node_modules/@types"
],
"types": [
"node"
]
}

0 comments on commit b89e353

Please sign in to comment.