From 68ce61ac9dc6b232618da134ff61079138cdfb10 Mon Sep 17 00:00:00 2001 From: york yao Date: Mon, 15 May 2017 06:45:39 +0800 Subject: [PATCH] remove html-minifier --- package.json | 8 +++----- src/angular-variables.ts | 4 ++-- src/angular.ts | 6 +++--- src/vue-variables.ts | 4 ++-- src/vue.ts | 6 +++--- 5 files changed, 13 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index f76548f..32b6d57 100644 --- a/package.json +++ b/package.json @@ -4,13 +4,12 @@ "description": "A reactjs, angular and vuejs tree component.", "main": "index.js", "scripts": { - "build": "npm run minifier-template && npm run file2variable && npm run clean && tsc -p src && tsc -p demo && lessc src/tree.less > dist/tree.css && cleancss -o dist/tree.min.css dist/tree.css && webpack --config demo/webpack.config.js && npm run rev", + "build": "npm run file2variable && npm run clean && tsc -p src && tsc -p demo && lessc src/tree.less > dist/tree.css && cleancss -o dist/tree.min.css dist/tree.css && webpack --config demo/webpack.config.js && npm run rev", "lint": "tslint \"src/*.ts\" \"src/*.tsx\" \"demo/**/*.ts\" \"demo/**/*.tsx\" && stylelint \"src/*.less\" --syntax less", "rev": "npm run clean-rev && rev-static --config demo/rev-static.config.js", "clean-rev": "rimraf demo/react.bundle-*.js demo/vue.bundle-*.js demo/angular.bundle-*.js", "image": "image2base64-cli images/*.png images/*.gif --less src/variables.less", - "minifier-template": "html-minifier --collapse-whitespace --case-sensitive --collapse-inline-tag-whitespace src/vue-node.template.html -o src/vue-node.html && html-minifier --collapse-whitespace --case-sensitive --collapse-inline-tag-whitespace src/vue-tree.template.html -o src/vue-tree.html && html-minifier --collapse-whitespace --case-sensitive --collapse-inline-tag-whitespace src/angular-node.template.html -o src/angular-node.html && html-minifier --collapse-whitespace --case-sensitive --collapse-inline-tag-whitespace src/angular-tree.template.html -o src/angular-tree.html", - "file2variable": "file2variable-cli src/angular-node.html src/angular-tree.html -o src/angular-variables.ts && file2variable-cli src/vue-node.html src/vue-tree.html -o src/vue-variables.ts", + "file2variable": "file2variable-cli src/angular-node.template.html src/angular-tree.template.html -o src/angular-variables.ts --html-minify && file2variable-cli src/vue-node.template.html src/vue-tree.template.html -o src/vue-variables.ts --html-minify", "clean": "rimraf dist" }, "repository": { @@ -35,8 +34,7 @@ "@types/react-dom": "15.5.0", "clean-css-cli": "4.0.12", "core-js": "2.4.1", - "file2variable-cli": "1.0.0", - "html-minifier": "3.4.3", + "file2variable-cli": "1.1.0", "image2base64-cli": "1.0.3", "less": "2.7.2", "react": "15.5.4", diff --git a/src/angular-variables.ts b/src/angular-variables.ts index 2d6c2fc..551ed06 100644 --- a/src/angular-variables.ts +++ b/src/angular-variables.ts @@ -1,2 +1,2 @@ -export const srcAngularNodeHtml = `
  • {{data.text}} 
  • `; -export const srcAngularTreeHtml = `
    `; +export const srcAngularNodeTemplateHtml = `
  • {{data.text}} 
  • `; +export const srcAngularTreeTemplateHtml = `
    `; diff --git a/src/angular.ts b/src/angular.ts index a3aa422..7f125d6 100644 --- a/src/angular.ts +++ b/src/angular.ts @@ -1,10 +1,10 @@ import { Component, Input, Output, EventEmitter } from "@angular/core"; import * as common from "./common"; -import { srcAngularNodeHtml, srcAngularTreeHtml } from "./angular-variables"; +import { srcAngularNodeTemplateHtml, srcAngularTreeTemplateHtml } from "./angular-variables"; @Component({ selector: "node", - template: srcAngularNodeHtml, + template: srcAngularNodeTemplateHtml, }) export class NodeComponent { @Input() @@ -87,7 +87,7 @@ export class NodeComponent { @Component({ selector: "tree", - template: srcAngularTreeHtml, + template: srcAngularTreeTemplateHtml, }) export class TreeComponent { @Input() diff --git a/src/vue-variables.ts b/src/vue-variables.ts index 9846022..c53a9f4 100644 --- a/src/vue-variables.ts +++ b/src/vue-variables.ts @@ -1,2 +1,2 @@ -export const srcVueNodeHtml = `
  • {{data.text}} 
  • `; -export const srcVueTreeHtml = `
    `; +export const srcVueNodeTemplateHtml = `
  • {{data.text}} 
  • `; +export const srcVueTreeTemplateHtml = `
    `; diff --git a/src/vue.ts b/src/vue.ts index 9f35e79..97a06ef 100644 --- a/src/vue.ts +++ b/src/vue.ts @@ -1,10 +1,10 @@ import * as Vue from "vue"; import Component from "vue-class-component"; import * as common from "./common"; -import { srcVueNodeHtml, srcVueTreeHtml } from "./vue-variables"; +import { srcVueNodeTemplateHtml, srcVueTreeTemplateHtml } from "./vue-variables"; @Component({ - template: srcVueNodeHtml, + template: srcVueNodeTemplateHtml, props: ["data", "last", "checkbox", "path", "draggable"], }) class Node extends Vue { @@ -79,7 +79,7 @@ class Node extends Vue { Vue.component("node", Node); @Component({ - template: srcVueTreeHtml, + template: srcVueTreeTemplateHtml, props: ["data", "checkbox", "draggable", "nodots", "size", "theme"], }) export class Tree extends Vue {