Skip to content
This repository has been archived by the owner on Mar 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #37 from olback/2.0.3
Browse files Browse the repository at this point in the history
Fixed #35, 2.0.3 release
  • Loading branch information
olback committed Jul 25, 2018
2 parents 4ac1d1a + 1304f9f commit 353054d
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.0.3
* Merged PR #36
* Fixed bug #35

# 2.0.2
* Added some tests.
* You can no longer minify minified files
Expand Down
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# JS & CSS Minifier

# Please read the changelog!

[![Visual Studio Marketplace](https://vsmarketplacebadge.apphb.com/installs-short/olback.es6-css-minify.svg)](https://marketplace.visualstudio.com/items?itemName=olback.es6-css-minify)
[![rating](https://vsmarketplacebadge.apphb.com/rating-star/olback.es6-css-minify.svg)](https://marketplace.visualstudio.com/items?itemName=olback.es6-css-minify)
[![Visual Studio Marketplace](https://vsmarketplacebadge.apphb.com/version/olback.es6-css-minify.svg)](https://marketplace.visualstudio.com/items?itemName=olback.es6-css-minify)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "es6-css-minify",
"displayName": "JS & CSS Minifier",
"description": "Easily Minify ES5/ES6/ES7/ES8 and CSS",
"version": "2.0.2",
"version": "2.0.3",
"publisher": "olback",
"icon": "icon.png",
"galleryBanner": {
Expand Down
14 changes: 7 additions & 7 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@ function loadConfig(settings: ConfSettings = { showMessage: true, loadExternal:
return _config;
}

// console.log('vsc path: ' + vscode.workspace.workspaceFolders[0].uri.path);
// console.log('vsc path: ' + vscode.workspace.workspaceFolders[0].uri.fsPath);
// console.log('s path: ' + config.uglifyConfigFile);

if (settings.loadExternal) {

// Load uglify config if it exists
const uglifyrcPath = path.join(vscode.workspace.workspaceFolders[0].uri.path, _config.uglifyConfigFile);
const uglifyrcPath = path.join(vscode.workspace.workspaceFolders[0].uri.fsPath, _config.uglifyConfigFile);
if (fs.existsSync(uglifyrcPath)) {

try {
Expand All @@ -90,7 +90,7 @@ function loadConfig(settings: ConfSettings = { showMessage: true, loadExternal:
}

// Load cleancss config if it exists
const cleancssrcPath = path.join(vscode.workspace.workspaceFolders[0].uri.path, _config.cleancssConfigFile);
const cleancssrcPath = path.join(vscode.workspace.workspaceFolders[0].uri.fsPath, _config.cleancssConfigFile);
if (fs.existsSync(cleancssrcPath)) {

try {
Expand Down Expand Up @@ -135,9 +135,9 @@ function getMinOutPath(doc: vscode.TextDocument): string {
let outNameParts = file.basename.split('.');

outNameParts.pop();
outNameParts.push('.min');
outNameParts.push(file.extname);
const baseOut = outNameParts.join('');
outNameParts.push('min');
outNameParts.push(file.extname.replace('.', ''));
const baseOut = outNameParts.join('.');

let outPath: string;

Expand Down Expand Up @@ -222,7 +222,7 @@ function minify(): void {

// Make sure the out path exist
if (!fs.existsSync(path.dirname(file.outpath))) {
vscode.window.showWarningMessage(`Could not write file to ${path.dirname(file.outpath)}. Path not found.`);
vscode.window.showWarningMessage(`Could not write file to folder ${path.dirname(file.outpath)}. Path not found.`);
return;
}

Expand Down
2 changes: 1 addition & 1 deletion src/test/workspace/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"es6-css-minify.minifyOnSave": "exists",
"es6-css-minify.jsMinPath": "dist/js",
"es6-css-minify.jsMinPath": "",
"es6-css-minify.cssMinPath": "dist/css"
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/

(function ($) {
class showDivWithTextA {
class showDivWithText {
constructor(param) {
this.text = param;
this.init();
Expand Down

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

1 change: 0 additions & 1 deletion src/test/workspace/js/main.min.js.map

This file was deleted.

0 comments on commit 353054d

Please sign in to comment.