Socket
Socket
Sign inDemoInstall

ember-web-app

Package Overview
Dependencies
432
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

lib/base-manifest.js

14

blueprints/ember-web-app/index.js

@@ -0,1 +1,7 @@

'use strict';
const { EOL } = require('os');
const path = require('path');
const Manifest = require('../../lib/manifest');
const Browserconfig = require('../../lib/browserconfig');
module.exports = {

@@ -11,2 +17,10 @@ description: 'Generates a configuration for web app manifest.',

},
afterInstall() {
let index = path.join('app', 'index.html');
let content = `${EOL} ${Manifest.tag}${EOL} ${Browserconfig.tag}`;
let after = `{{content-for "head"}}${EOL}`;
return this.insertIntoFile(index, content, { after });
},
};
# Changelog
## v3.0.0-beta.4 (2019-06-19)
#### :boom: Breaking Change
- [#148](https://github.com/zonkyio/ember-web-app/pull/148) Use explicit references for manifest and browserconfig ([@bobisjan](https://github.com/bobisjan))
- [#147](https://github.com/zonkyio/ember-web-app/pull/147) Remove `enabled` configuration option ([@bobisjan](https://github.com/bobisjan))
#### :rocket: Enhancement
- [#148](https://github.com/zonkyio/ember-web-app/pull/148) Use explicit references for manifest and browserconfig ([@bobisjan](https://github.com/bobisjan))
#### :memo: Documentation
- [#177](https://github.com/zonkyio/ember-web-app/pull/177) Restructure documentation ([@bobisjan](https://github.com/bobisjan))
#### Committers: 2
- Jan Bobisud ([@bobisjan](https://github.com/bobisjan))
- [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview)
## v3.0.0-beta.3 (2019-05-08)

@@ -4,0 +24,0 @@

57

index.js

@@ -6,6 +6,5 @@ 'use strict';

const BroccoliMergeTrees = require('broccoli-merge-trees');
const Manifest = require('./lib/manifest');
const Browserconfig = require('./lib/browserconfig');
const MANIFEST_NAME = 'manifest.webmanifest';
const BROWSERCONFIG_NAME = 'browserconfig.xml';
module.exports = {

@@ -25,12 +24,12 @@ name: require('./package').name,

app.options = app.options || {};
app.options[this.name] = app.options[this.name] || {};
this.addonBuildConfig = this.app.options['ember-web-app'] || {};
this.manifest = new Manifest(app);
this.browserconfig = new Browserconfig(app);
if (!this._disabled()) {
this._configureFingerprint();
this.manifestConfiguration = getManifestConfiguration(
this.app.project,
this.app.env
);
}
this._configureFingerprint();
this.manifestConfiguration = getManifestConfiguration(
this.app.project,
this.app.env
);

@@ -40,10 +39,2 @@ this._super.included.apply(this, arguments);

treeFor() {
if (this._disabled()) {
return;
}
return this._super.treeFor.apply(this, arguments);
},
treeForPublic() {

@@ -54,3 +45,3 @@ const configPath = path.join(this.app.project.root, 'config');

const manifest = new GenerateManifest(configPath, {
manifestName: MANIFEST_NAME,
manifest: this.manifest,
project: this.app.project,

@@ -63,3 +54,3 @@ env: this.app.env,

const browserconfig = new GenerateBrowserconfig(configPath, {
browserconfigName: BROWSERCONFIG_NAME,
browserconfig: this.browserconfig,
project: this.app.project,

@@ -74,6 +65,2 @@ env: this.app.env,

contentFor(section, config) {
if (this._disabled()) {
return;
}
if (section === 'head') {

@@ -83,7 +70,3 @@ let tags = [];

tags = tags.concat(
require('./lib/android-link-tags')(
config,
this.addonBuildConfig,
MANIFEST_NAME
)
require('./lib/android-link-tags')(this.manifestConfiguration, config)
);

@@ -107,7 +90,3 @@ tags = tags.concat(

tags = tags.concat(
require('./lib/ms-meta-tags')(
this.manifestConfiguration,
config,
BROWSERCONFIG_NAME
)
require('./lib/ms-meta-tags')(this.manifestConfiguration, config)
);

@@ -124,3 +103,3 @@

this.app.options.fingerprint,
MANIFEST_NAME
this.manifest.name
);

@@ -130,9 +109,5 @@

this.app.options.fingerprint,
BROWSERCONFIG_NAME
this.browserconfig.name
);
},
_disabled() {
return this.addonBuildConfig.enabled === false;
},
};
'use strict';
module.exports = androidLinkTags;
function androidLinkTags(config, addonConfig, manifestName) {
let resolveURL = require('./resolve-url');
let resolveRootURL = require('./resolve-root-url');
let rootURL = resolveRootURL(config);
let url = resolveURL(rootURL, manifestName);
let crossorigin = '';
if (addonConfig.crossorigin) {
crossorigin = ` crossorigin="${addonConfig.crossorigin}"`;
}
return [`<link rel="manifest" href="${url}"${crossorigin}>`];
function androidLinkTags(/*manifest, config*/) {
return [];
}

@@ -32,6 +32,6 @@ 'use strict';

if (shouldGenerateBrowserconfig(manifest)) {
if (options.browserconfig.isRequired) {
const outputFilePath = path.join(
this.outputPath,
options.browserconfigName
options.browserconfig.name
);

@@ -46,12 +46,4 @@ const browserconfig = generateBrowserconfigFromConfiguration(

}
static shouldGenerateBrowserconfig(manifest) {
return shouldGenerateBrowserconfig(manifest);
}
}
function shouldGenerateBrowserconfig(manifest) {
return manifest.ms;
}
module.exports = GenerateBrowserconfig;

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

let outputFilePath = path.join(this.outputPath, this.options.manifestName);
let outputFilePath = path.join(this.outputPath, this.options.manifest.name);
fs.writeFileSync(

@@ -32,0 +32,0 @@ outputFilePath,

'use strict';
const GenerateBrowserconfig = require('./broccoli/generate-browserconfig-xml');
module.exports = msMetaTags;
function msMetaTags(manifest, config, browserconfigName) {
if (GenerateBrowserconfig.shouldGenerateBrowserconfig(manifest)) {
const resolveURL = require('./resolve-url');
const resolveRootURL = require('./resolve-root-url');
const rootURL = resolveRootURL(config);
const url = resolveURL(rootURL, browserconfigName);
return [`<meta name="msapplication-config" content="${url}">`];
} else {
return [];
}
function msMetaTags(/*manifest, config*/) {
return [];
}
{
"name": "ember-web-app",
"version": "3.0.0-beta.3",
"description": "This Ember addon helps you configure and manage the web app manifest and related meta tags needed to create a Progressive Web Application",
"version": "3.0.0-beta.4",
"description": "This Ember addon helps you configure and manage the Web App Manifest to create a Progressive Web App",
"keywords": [

@@ -37,13 +37,14 @@ "PWA",

"ember-cli-babel": "^7.7.3",
"jsdom": "^15.1.1",
"web-app-manifest-validator": "^1.0.0",
"xmlbuilder": "^13.0.0"
"xmlbuilder": "^13.0.2"
},
"devDependencies": {
"@ember/optional-features": "^0.7.0",
"ember-cli": "~3.9.0",
"ember-cli-addon-docs": "^0.6.10",
"ember-cli-addon-docs-esdoc": "^0.2.1",
"ember-cli": "~3.10.1",
"ember-cli-addon-docs": "^0.6.13",
"ember-cli-addon-docs-esdoc": "^0.2.2",
"ember-cli-addon-tests": "^0.11.1",
"ember-cli-blueprint-test-helpers": "^0.19.2",
"ember-cli-dependency-checker": "^3.1.0",
"ember-cli-dependency-checker": "^3.2.0",
"ember-cli-deploy": "^1.0.2",

@@ -65,15 +66,15 @@ "ember-cli-deploy-build": "^1.1.1",

"ember-resolver": "^5.1.3",
"ember-source": "~3.9.1",
"ember-source-channel-url": "^1.1.0",
"ember-try": "^1.0.0",
"ember-source": "~3.10.2",
"ember-source-channel-url": "^2.0.1",
"ember-try": "^1.2.1",
"eslint": "^5.16.0",
"eslint-config-prettier": "^4.1.0",
"eslint-plugin-ember": "^6.3.0",
"eslint-plugin-node": "^9.0.1",
"eslint-plugin-prettier": "^3.0.1",
"eslint-config-prettier": "^5.0.0",
"eslint-plugin-ember": "^6.6.0",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"lerna-changelog": "^0.8.2",
"loader.js": "^4.7.0",
"mocha": "^6.1.4",
"prettier": "^1.17.0",
"qunit-dom": "^0.8.4"
"prettier": "^1.18.2",
"qunit-dom": "^0.9.0"
},

@@ -80,0 +81,0 @@ "resolutions": {

@@ -9,3 +9,3 @@ # ember-web-app

This Ember addon helps you configure and manage the web app manifest and related meta tags needed to create a Progressive Web Application
This Ember addon helps you configure and manage the Web App Manifest to create a Progressive Web App.

@@ -16,2 +16,3 @@ ## Compatibility

- Ember CLI v2.13 or above
- Node.js v8 or above

@@ -18,0 +19,0 @@ ## Installation

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc