Ich bin neu zu Ember. Aber für eine bestimmte Aufgabe muss ich den Eingabepfad von Vorlagen zum Kompilieren ändern. d. h. Standard ist app/templates. aber ich möchte diesen weg ändern. Ich habe die Datei ember-cli-build.js gelesen, aber ich kann nur den Ausgabepfad bearbeiten. Wie kann ich den Eingabepfad bearbeiten? Mein glut-cli-build.jsEmber-cli, wie Eingabepfad von Dateien zu ändern
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
outputPaths: {
app: {
html: 'ember_build_index.html'
}
}
});
// Use `app.import` to add additional libraries to the generated
// output files.
//
// If you need to use different assets in different
// environments, specify an object as the first parameter. That
// object's keys should be the environment name and the values
// should be the asset to use in that environment.
//
// If the library that you are including contains AMD or ES6
// modules that you would like to import into your application
// please specify an object with the list of modules as keys
// along with the exports of each module as its value.
app.import('bower_components/bootstrap/dist/js/bootstrap.min.js');
app.import('bower_components/bootstrap/dist/css/bootstrap.min.css');
app.import('bower_components/bootstrap/dist/css/bootstrap.css.map');
return app.toTree();
};
Warum möchten Sie das tun? Sie können ein In-Repo-Addon verwenden, aber abhängig davon, was Sie wollen, müssen Sie auch Ihren Resolver bearbeiten. – Lux
weil ich verschiedene Vorlagen für Handys mit kleinen Änderungen aus dem Internet verwenden möchte. aber ich möchte Javascript unverändert lassen. –
Erweitern Sie Ihre vorhandenen Komponenten und legen Sie einfach 'layoutName' in Ihrer neuen Komponente mit dem Namen der mobilen Vorlage fest. – MilkyWayJoe