Skip to content

Commit

Permalink
[ZEPPELIN-2544] clean task doesn't work in zeppelin-web
Browse files Browse the repository at this point in the history
### What is this PR for?

`prebuild` task in package.json doesn't work for `build:*` tasks in zeppelin-web

otherwise we will get overwritten result, if previous build for zeppelin-web failed like

```
[INFO] Running "cacheBust:taskName" (cacheBust) task
[INFO] Warning: Unable to write "/Users/jl/local/src/g/zeppelin/zeppelin-web/dist/styles/vendor.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.e7906afb60fa5267.css" file (Error code: ENAMETOOLONG). Use --force to continue.
```

### What type of PR is it?
[Bug Fix]

### Todos

DONE

### What is the Jira issue?

[ZEPPELIN-2544](https://issues.apache.org/jira/browse/ZEPPELIN-2544)

### How should this be tested?

- `cd zeppelin-web`
- `npm run build:dist`

Then, check the console output whether `prebuild` is applied or not.

### Screenshots (if appropriate)

```
## Before

$ zeppelin-web git:(ZEPPELIN-2544/prebuild-does-not-work) npm run build:dist

> zeppelin-web0.0.0 build:dist /Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web
> grunt pre-webpack-dist && webpack && grunt post-webpack-dist

## After

zeppelin-web git:(ZEPPELIN-2544/prebuild-does-not-work) ✗ npm run build:dist

> zeppelin-web0.0.0 build:dist /Users/1ambda/github/apache/apache-zeppelin/zeppelin-master/zeppelin-web
> npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist
```

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - NO

Author: 1ambda <1amb4a@gmail.com>

Closes #2351 from 1ambda/ZEPPELIN-2544/prebuild-does-not-work and squashes the following commits:

47d4f87 [1ambda] fix: Use prebuild in pcakage.json
  • Loading branch information
1ambda authored and Leemoonsoo committed May 28, 2017
1 parent c70f29b commit cc0839e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zeppelin-web/package.json
Expand Up @@ -9,8 +9,8 @@
"clean": "rimraf dist && rimraf .tmp",
"postinstall": "bower install --silent",
"prebuild": "npm-run-all clean lint:once",
"build:dist": "grunt pre-webpack-dist && webpack && grunt post-webpack-dist",
"build:ci": "grunt pre-webpack-ci && webpack && grunt post-webpack-dist",
"build:dist": "npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist",
"build:ci": "npm-run-all prebuild && grunt pre-webpack-ci && webpack && grunt post-webpack-dist",
"lint:watch": "esw --watch src",
"lint:once": "eslint src",
"predev": "grunt pre-webpack-dev",
Expand Down

0 comments on commit cc0839e

Please sign in to comment.