binhend 2.0.7 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "binhend",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "author": "Nguyen Duc Binh",
@@ -50,7 +50,7 @@ function customRequire(filePath) {
50
50
  function applyDefaultFileCSS() {
51
51
  var cssModuleFile = path.parse(this.module.filename).name + '.css.js';
52
52
  try {
53
- var cssModule = this.require(cssModuleFile);
53
+ var cssModule = this.require('./' + cssModuleFile);
54
54
  css.bind(this)(cssModule);
55
55
  }
56
56
  catch (error) {}
@@ -87,7 +87,7 @@ binh.component = function(context, ui, service, style) {
87
87
  component.as = alias;
88
88
  component.eachChild = loopComponentChildren;
89
89
 
90
- applyDefaultFileCSS.bind(context)();
90
+ if (type === 'ui') applyDefaultFileCSS.bind(context)();
91
91
  };
92
92
 
93
93
  binh.final = function(module) {
@@ -108,24 +108,6 @@ function loopComponentChildren(callback) {
108
108
  });
109
109
  }
110
110
 
111
- binh.ui = function(module, component, htmltags, links) {
112
- binh.component({ module }, component);
113
- component.htmltags = htmltags;
114
- component.links = links;
115
- binh.final(module);
116
- };
117
-
118
- binh.service = function(module, component, links) {
119
- binh.component({ module }, null, component, null);
120
- component.links = links;
121
- binh.final(module);
122
- };
123
-
124
- binh.style = function(module, component) {
125
- binh.component({ module }, null, null, component);
126
- binh.final(module);
127
- };
128
-
129
111
  binh.css = function(module, cssFilename) {
130
112
  var cssFilePath = cssFilename && path.join(module.path, cssFilename) || module.filename.replace(/.js$/, '');
131
113
  var content = fs.readFileSync(cssFilePath, { encoding: 'utf8', flag: 'r' });
package/testa.js DELETED
@@ -1,7 +0,0 @@
1
-
2
-
3
- const path = require('path');
4
-
5
- console.log(
6
- path.parse('fileA.css.js')
7
- );