Skip to content

Commit

Permalink
Merge pull request microsoft#1 from Microsoft/pgonzal/rush5-initial-e…
Browse files Browse the repository at this point in the history
…xample

Set up initial demo projects
  • Loading branch information
pgonzal authored Sep 12, 2018
2 parents d6984bf + 48feeb3 commit f0e5fbc
Show file tree
Hide file tree
Showing 23 changed files with 896 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Don't allow people to merge changes to these generated files, because the result
# may be invalid. You need to run "rush update" again.
shrinkwrap.yaml merge=binary
npm-shrinkwrap.json merge=binary
yarn.lock merge=binary
13 changes: 10 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ build/Release
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

Expand All @@ -59,3 +56,13 @@ typings/

# next.js build output
.next

# Common toolchain intermediate files
lib
lib-amd
lib-es6
temp

# Rush files
common/temp/**
package-deps.json
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: node_js
node_js:
- '8.9.4'
script:
- set -e

- echo 'Checking for missing change logs...' && echo -en 'travis_fold:start:change\\r'
- git fetch origin master:refs/remotes/origin/master -a
- node common/scripts/install-run-rush.js change -v
- echo -en 'travis_fold:end:change\\r'

- echo 'Checking for inconsistent dependency versions' && echo -en 'travis_fold:start:check\\r'
- node common/scripts/install-run-rush.js check
- echo -en 'travis_fold:end:check\\r'

- echo 'Installing...' && echo -en 'travis_fold:start:install\\r'
- node common/scripts/install-run-rush.js install
- echo -en 'travis_fold:end:install\\r'

- echo 'Building...' && echo -en 'travis_fold:start:build\\r'
- node common/scripts/install-run-rush.js rebuild --verbose
- echo -en 'travis_fold:end:build\\r'
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,29 @@
# Example Rush Monorepo

This template is part of the documentation of the [Rush](https://rushjs.io/) tool.
It contains documentated templates for all the standard Rush configuration files.
It also includes three barebones projects that illustrate some dependency
relationships in a Rush repo:

- **apps/my-app**: The web application
- **libraries/my-controls**: A control library used by the application
- **tools/my-toolchain**: A NodeJS build tool used to compile the other projects

(These projects are NOT meant to provide a realistic tool chain.)


# Building this repo

To build the projects in this repo, try these shell commands:

```
npm install -g @microsoft/rush
rush install
rush build
```

For more information, see the documentation at: https://rushjs.io/


# Contributing

Expand Down
17 changes: 17 additions & 0 deletions apps/my-app/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "my-app",
"version": "1.0.0",
"description": "An example application that consumes the my-controls library",
"license": "MIT",
"scripts": {
"build": "node_modules/.bin/my-build"
},
"dependencies": {
"my-controls": "^1.0.0",
"whatwg-fetch": "^3.0.0"
},
"devDependencies": {
"my-toolchain": "^1.0.0",
"typescript": "^3.0.3"
}
}
4 changes: 4 additions & 0 deletions apps/my-app/src/start.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { MyClass } from 'my-controls';

let myClass: MyClass = new MyClass();
myClass.doSomething();
8 changes: 8 additions & 0 deletions apps/my-app/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./node_modules/my-toolchain/includes/tsconfig-web.json",

"compilerOptions": {
"types": [
]
}
}
2 changes: 2 additions & 0 deletions common/config/rush/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
registry=https://registry.npmjs.org/
always-auth=false
14 changes: 14 additions & 0 deletions common/config/rush/browser-approved-packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// DO NOT ADD COMMENTS IN THIS FILE. They will be lost when the Rush tool resaves it.
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/approved-packages.schema.json",
"packages": [
{
"name": "my-controls",
"allowedCategories": [ "main" ]
},
{
"name": "whatwg-fetch",
"allowedCategories": [ "main" ]
}
]
}
22 changes: 22 additions & 0 deletions common/config/rush/nonbrowser-approved-packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// DO NOT ADD COMMENTS IN THIS FILE. They will be lost when the Rush tool resaves it.
{
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/approved-packages.schema.json",
"packages": [
{
"name": "colors",
"allowedCategories": [ "tools" ]
},
{
"name": "my-toolchain",
"allowedCategories": [ "main" ]
},
{
"name": "rimraf",
"allowedCategories": [ "tools" ]
},
{
"name": "typescript",
"allowedCategories": [ "main", "tools" ]
}
]
}
144 changes: 144 additions & 0 deletions common/config/rush/shrinkwrap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
dependencies:
'@rush-temp/my-app': 'file:projects/my-app.tgz'
'@rush-temp/my-controls': 'file:projects/my-controls.tgz'
'@rush-temp/my-toolchain': 'file:projects/my-toolchain.tgz'
'@types/node': 10.9.4
colors: 1.3.2
rimraf: 2.6.2
typescript: 3.0.3
whatwg-fetch: 3.0.0
packages:
/@types/node/10.9.4:
dev: false
resolution:
integrity: sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==
/balanced-match/1.0.0:
dev: false
resolution:
integrity: sha1-ibTRmasr7kneFk6gK4nORi1xt2c=
/brace-expansion/1.1.11:
dependencies:
balanced-match: 1.0.0
concat-map: 0.0.1
dev: false
resolution:
integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==
/colors/1.3.2:
dev: false
engines:
node: '>=0.1.90'
resolution:
integrity: sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==
/concat-map/0.0.1:
dev: false
resolution:
integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
/fs.realpath/1.0.0:
dev: false
resolution:
integrity: sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
/glob/7.1.3:
dependencies:
fs.realpath: 1.0.0
inflight: 1.0.6
inherits: 2.0.3
minimatch: 3.0.4
once: 1.4.0
path-is-absolute: 1.0.1
dev: false
resolution:
integrity: sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==
/inflight/1.0.6:
dependencies:
once: 1.4.0
wrappy: 1.0.2
dev: false
resolution:
integrity: sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=
/inherits/2.0.3:
dev: false
resolution:
integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
/minimatch/3.0.4:
dependencies:
brace-expansion: 1.1.11
dev: false
resolution:
integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
/once/1.4.0:
dependencies:
wrappy: 1.0.2
dev: false
resolution:
integrity: sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
/path-is-absolute/1.0.1:
dev: false
engines:
node: '>=0.10.0'
resolution:
integrity: sha1-F0uSaHNVNP+8es5r9TpanhtcX18=
/rimraf/2.6.2:
dependencies:
glob: 7.1.3
dev: false
hasBin: true
resolution:
integrity: sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==
/typescript/3.0.3:
dev: false
engines:
node: '>=4.2.0'
hasBin: true
resolution:
integrity: sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==
/whatwg-fetch/3.0.0:
dev: false
resolution:
integrity: sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==
/wrappy/1.0.2:
dev: false
resolution:
integrity: sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
'file:projects/my-app.tgz':
dependencies:
typescript: 3.0.3
whatwg-fetch: 3.0.0
dev: false
name: '@rush-temp/my-app'
resolution:
integrity: sha512-YThRXWcn2MrdOxASWIYh2UP6tAxJjLKXAZ/Bl6A9RBZ3cM0qhvglIkrveW8LGOqt9PQM8Z8578DAbWNKfydrIw==
tarball: 'file:projects/my-app.tgz'
version: 0.0.0
'file:projects/my-controls.tgz':
dependencies:
typescript: 3.0.3
dev: false
name: '@rush-temp/my-controls'
resolution:
integrity: sha512-oHXOZCwlbGEILYNWY1vV0/W/Y9oPXB7r6QoLVZdUv/TZ20brYDtZ9/WIzqjN1YNUQRJpmtyyLxp/NAhM8tphBg==
tarball: 'file:projects/my-controls.tgz'
version: 0.0.0
'file:projects/my-toolchain.tgz':
dependencies:
'@types/node': 10.9.4
colors: 1.3.2
rimraf: 2.6.2
typescript: 3.0.3
dev: false
name: '@rush-temp/my-toolchain'
resolution:
integrity: sha512-Bsw9RLje8o0Xf64piV/WYvGHUeIJr82qre7pjzVUExinr/nV9wQ/16XX+W+cRWoYdjcgSaIYdueikz6YQ+OtNQ==
tarball: 'file:projects/my-toolchain.tgz'
version: 0.0.0
registry: 'https://registry.npmjs.org/'
shrinkwrapMinorVersion: 9
shrinkwrapVersion: 3
specifiers:
'@rush-temp/my-app': 'file:./projects/my-app.tgz'
'@rush-temp/my-controls': 'file:./projects/my-controls.tgz'
'@rush-temp/my-toolchain': 'file:./projects/my-toolchain.tgz'
'@types/node': ^10.9.4
colors: ^1.3.2
rimraf: ^2.6.2
typescript: ^3.0.3
whatwg-fetch: ^3.0.0
51 changes: 51 additions & 0 deletions common/scripts/install-run-rush.js

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

Loading

0 comments on commit f0e5fbc

Please sign in to comment.