Socket
Socket
Sign inDemoInstall

ember-cli-htmlbars

Package Overview
Dependencies
Maintainers
4
Versions
112
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-htmlbars - npm Package Compare versions

Comparing version 4.3.1 to 4.4.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

## v4.4.0 (2020-08-11)
#### :rocket: Enhancement
* [#598](https://github.com/ember-cli/ember-cli-htmlbars/pull/598) Pass `isProduction` to Ember template compiler. ([@rwjblue](https://github.com/rwjblue))
#### Committers: 1
- Robert Jackson ([@rwjblue](https://github.com/rwjblue))
## v4.3.1 (2020-04-09)

@@ -2,0 +10,0 @@

17

lib/ember-addon-main.js

@@ -63,2 +63,4 @@ 'use strict';

let isProduction = process.env.EMBER_ENV === 'production';
// when this.parent === this.project, `this.parent.name` is a function 😭

@@ -77,3 +79,3 @@ let parentName = typeof this.parent.name === 'function' ? this.parent.name() : this.parent.name;

let shouldColocateTemplates = this._addon._shouldColocateTemplates();
let htmlbarsOptions = this._addon.htmlbarsOptions();
let htmlbarsOptions = Object.assign({ isProduction }, this._addon.htmlbarsOptions());

@@ -92,6 +94,11 @@ let inputTree = debugTree(tree, '01-input');

precompile(string, options) {
precompile(string, _options) {
let options = _options;
let htmlbarsOptions = this._addon.htmlbarsOptions();
let templateCompiler = htmlbarsOptions.templateCompiler;
if (isProduction) {
options = Object.assign({ isProduction }, _options);
}
return utils.template(templateCompiler, string, options);

@@ -151,2 +158,4 @@ },

let isProduction = process.env.EMBER_ENV === 'production';
// add the babel-plugin-htmlbars-inline-precompile to the list of plugins

@@ -163,3 +172,4 @@ // used by `ember-cli-babel` addon

pluginInfo,
templateCompilerPath
templateCompilerPath,
isProduction
);

@@ -173,2 +183,3 @@

let htmlBarsPlugin = utils.setup(pluginInfo, {
isProduction,
projectConfig: this.projectConfig(),

@@ -175,0 +186,0 @@ templateCompilerPath,

@@ -74,2 +74,3 @@ 'use strict';

contents: string,
isProduction: this.options.isProduction,
moduleName: relativePath,

@@ -76,0 +77,0 @@ parseOptions: {

6

lib/utils.js

@@ -49,3 +49,3 @@ 'use strict';

function buildParalleizedBabelPlugin(pluginInfo, templateCompilerPath) {
function buildParalleizedBabelPlugin(pluginInfo, templateCompilerPath, isProduction) {
let parallelBabelInfo = {

@@ -56,2 +56,3 @@ requireFile: require.resolve('./require-from-worker'),

templateCompilerPath,
isProduction,
parallelConfigs: pluginInfo.parallelConfigs,

@@ -181,2 +182,3 @@ modules: INLINE_PRECOMPILE_MODULES,

let precompiled = templateCompiler.precompile(string, options);
return 'Ember.HTMLBars.template(' + precompiled + ')';

@@ -204,3 +206,3 @@ }

require.resolve('babel-plugin-htmlbars-inline-precompile'),
{ precompile, modules: INLINE_PRECOMPILE_MODULES },
{ precompile, isProduction: options.isProduction, modules: INLINE_PRECOMPILE_MODULES },
'ember-cli-htmlbars:inline-precompile',

@@ -207,0 +209,0 @@ ];

{
"name": "ember-cli-htmlbars",
"version": "4.3.1",
"version": "4.4.0",
"description": "A library for adding htmlbars to ember CLI",

@@ -36,3 +36,3 @@ "keywords": [

"@ember/edition-utils": "^1.2.0",
"babel-plugin-htmlbars-inline-precompile": "^3.0.1",
"babel-plugin-htmlbars-inline-precompile": "^3.2.0",
"broccoli-debug": "^0.6.5",

@@ -39,0 +39,0 @@ "broccoli-persistent-filter": "^2.3.1",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc