Skip to content

Commit

Permalink
Prepare for release and update packages
Browse files Browse the repository at this point in the history
  • Loading branch information
rtfpessoa committed Feb 7, 2016
1 parent 59914f1 commit f0363ec
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
1 change: 1 addition & 0 deletions dist/diff2html.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@

var diffLines =
diffInput.replace(/\\ No newline at end of file/g, '')
.replace(/\r\n?/g, '\n')
.split('\n');

/* Diff */
Expand Down
2 changes: 1 addition & 1 deletion dist/diff2html.min.css

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

5 changes: 3 additions & 2 deletions dist/diff2html.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@
},
"main": "./src/diff2html.js",
"dependencies": {
"diff": "2.2.*"
"diff": "^2.2.1"
},
"devDependencies": {
"codacy-coverage": "^1.1.3",
"clean-css": "^3.4.9",
"fast-html-parser": "^1.0.1",
"istanbul": "^0.4.1",
"jscs": "^2.7.0",
"less": "^2.5.3",
"mocha": "^2.3.4",
"jscs": "^2.9.0",
"mocha": "^2.4.5",
"uglifyjs": "^2.4.10",
"webpack": "^1.12.9"
"webpack": "^1.12.13"
},
"license": "MIT",
"files": [
Expand Down
4 changes: 3 additions & 1 deletion release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# by rtfpessoa
#

set -e

INPUT_DIR=src
INPUT_UI_DIR=${INPUT_DIR}/ui
INPUT_JS_FILE=${INPUT_DIR}/diff2html.js
Expand Down Expand Up @@ -47,6 +49,6 @@ cp -f ${INPUT_CSS_FILE} ${OUTPUT_CSS_FILE}

echo "Minifying ${OUTPUT_CSS_FILE} to ${OUTPUT_MIN_CSS_FILE}"

lessc -x ${OUTPUT_CSS_FILE} ${OUTPUT_MIN_CSS_FILE}
cleancss --advanced --compatibility=ie8 -o ${OUTPUT_MIN_CSS_FILE} ${OUTPUT_CSS_FILE}

echo "diff2html release created successfully!"
15 changes: 15 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Webpack config
var webpack = require('webpack');

module.exports = {

plugins: [

new webpack.DefinePlugin({
'process.env': {
IS_BROWSER: true
}
})

]
};

0 comments on commit f0363ec

Please sign in to comment.