Skip to content

Commit

Permalink
MM-9982 Switched to npm (mattermost#1102)
Browse files Browse the repository at this point in the history
* MM-9982 Switched to npm

* Updated jest

* Removed reference to yarn from end-to-end tests
  • Loading branch information
hmhealey authored and GoldUniform committed Apr 20, 2018
1 parent 01dadec commit a36151a
Show file tree
Hide file tree
Showing 6 changed files with 17,319 additions and 9,314 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
dist
.npminstall
.yarninstall
node_modules
*.swp
Expand Down
33 changes: 15 additions & 18 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
BUILD_SERVER_DIR = ../mattermost-server
EMOJI_TOOLS_DIR = ./build/emoji

check-style: .yarninstall ## Checks JS file for ESLint confirmity
check-style: .npminstall ## Checks JS file for ESLint confirmity
@echo Checking for style guide compliance

yarn run check
npm run check

test: .yarninstall ## Runs tests
test: .npminstall ## Runs tests
@echo Running jest unit/component testing

yarn run test
npm run test

.yarninstall: package.json
@echo Getting dependencies using yarn

yarn cache clean --pattern "mattermost-redux"
yarn install --pure-lockfile
.npminstall: package.json package-lock.json
@echo Getting dependencies using npm

npm install
cd node_modules/mattermost-redux; npm run build

touch $@
Expand All @@ -31,22 +30,22 @@ package: build ## Packages app
mv tmp/client dist
rmdir tmp

build: .yarninstall ## Builds the app
build: .npminstall ## Builds the app
@echo Building mattermost Webapp

rm -rf dist

yarn run build
npm run build

run: .yarninstall ## Runs app
run: .npminstall ## Runs app
@echo Running mattermost Webapp for development

yarn run run &
npm run run &

run-fullmap: .yarninstall ## Runs the app with the JS mapped to source (good for debugger)
run-fullmap: .npminstall ## Runs the app with the JS mapped to source (good for debugger)
@echo FULL SOURCE MAP Running mattermost Webapp for development FULL SOURCE MAP

yarn run run-fullmap &
npm run run-fullmap &

stop: ## Stops webpack
@echo Stopping changes watching
Expand All @@ -65,11 +64,9 @@ restart: | stop run ## Restarts the app
clean: ## Clears cached; deletes node_modules and dist directories
@echo Cleaning Webapp

yarn cache clean

rm -rf dist
rm -rf node_modules
rm -f .yarninstall
rm -f .npminstall

emojis: ## Creates emoji JSX file and extracts emoji images from the system font
gem install bundler
Expand Down
Loading

0 comments on commit a36151a

Please sign in to comment.