This repository has been archived by the owner on Oct 21, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Typescript via react-scripts #48
Merged
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
9cce81f
Uninstalls react-scripts-ts
MikelArnaiz 06bc126
Installs react-scripts
MikelArnaiz 6b43599
Replaces react-scripts-ts with react-scripts
MikelArnaiz 2c5a4c6
Adds typescript and @types dependencies
MikelArnaiz f67eaac
Removes outdated conf files
MikelArnaiz 07aec5a
Removes dependencies already provided by CRA
MikelArnaiz d4b0ec8
Creates tsconfig
MikelArnaiz b5264e0
Adds node-sass
MikelArnaiz bab12e6
Adds libs es6 and dom to tsconfig
MikelArnaiz e102bd6
Less strict ts
MikelArnaiz d9366cb
Skip fix error with any
MikelArnaiz 3209715
Allows experimentalDecorators
MikelArnaiz 0fab56c
Skip error with any
MikelArnaiz 108dad1
Removes unused const
MikelArnaiz 9c4577c
Types for compose
MikelArnaiz db260d7
Updates tsconfig
MikelArnaiz c6408be
Types for enzyme-adapter-react-16
MikelArnaiz a9ce84e
Skip error with any
MikelArnaiz a6f46f1
Updates ts-jest
MikelArnaiz 57a3356
Updates snapshots
MikelArnaiz 930e043
Using Yarn instead NPM
MikelArnaiz ac19551
Adds script to ensure Yarn as package manager
MikelArnaiz 9059e3f
Add docs
mdvanes 0fb2a6c
Replace deprecated button variant "raised" by "contained"
mdvanes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
'use strict'; | ||
|
||
/* | ||
Based on https://github.com/ampproject/amphtml/blob/master/build-system/check-package-manager.js | ||
*/ | ||
|
||
|
||
// Color formatting libraries may not be available when this script is run. | ||
function red(text) {return '\x1b[31m' + text + '\x1b[0m';} | ||
function cyan(text) {return '\x1b[36m' + text + '\x1b[0m';} | ||
function yellow(text) {return '\x1b[33m' + text + '\x1b[0m';} | ||
|
||
// If npm is being run, print a message and cause 'npm install' to fail. | ||
function ensureYarn() { | ||
if (process.env.npm_execpath.indexOf('yarn') === -1) { | ||
console.log(red( | ||
'*** Codestar-website-react uses yarn for package management ***'), '\n'); | ||
console.log(yellow('To install all packages:')); | ||
console.log(cyan('$'), 'yarn', '\n'); | ||
console.log( | ||
yellow('To install a new (runtime) package to "dependencies":')); | ||
console.log(cyan('$'), 'yarn add --exact [package_name@version]', '\n'); | ||
console.log( | ||
yellow('To install a new (toolset) package to "devDependencies":')); | ||
console.log(cyan('$'), | ||
'yarn add --dev --exact [package_name@version]', '\n'); | ||
console.log(yellow('To upgrade a package:')); | ||
console.log(cyan('$'), 'yarn upgrade --exact [package_name@version]', '\n'); | ||
console.log(yellow('To remove a package:')); | ||
console.log(cyan('$'), 'yarn remove [package_name]', '\n'); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
function main() { | ||
// Yarn is already used by default on Travis, so there is nothing more to do. | ||
if (process.env.TRAVIS) { | ||
return 0; | ||
} | ||
ensureYarn(); | ||
} | ||
|
||
main(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉