How to use the aurelia-cli.ProjectItem.text function in aurelia-cli

To help you get started, we’ve selected a few aurelia-cli examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aurelia-contrib / aurelia-open-id-connect-demos / aurelia-app-azure-active-directory / aurelia_project / generators / element.ts View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.elements.add(
          ProjectItem.text(`${fileName}.ts`, this.generateJSSource(className)),
          ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className))
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }
github aurelia-contrib / aurelia-open-id-connect-demos / aurelia-app-azure-active-directory / aurelia_project / generators / binding-behavior.ts View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.bindingBehaviors.add(
          ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }
github ariovistus / fasting-troubadour / samples / cli-sample / aurelia_project / generators / element.ts View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.elements.add(
          ProjectItem.text(`${fileName}.ts`, this.generateJSSource(className)),
          ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className))
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }
github SpringflowNL / aurelia-mdc-elements / aurelia_project / generators / element.js View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.elements.add(
          ProjectItem.text(`${fileName}.js`, this.generateJSSource(className)),
          ProjectItem.text(`${fileName}.html`, this.generateHTMLSource())
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }
github aurelia / cli / lib / resources / generators / binding-behavior.ts View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.bindingBehaviors.add(
          ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }
github SpringflowNL / aurelia-mdc-elements / aurelia_project / generators / component.js View on Github external
.then(subFolders => {

            let fileName = this.project.makeFileName(name);
            let className = this.project.makeClassName(name);

            self.project.root.add(
              ProjectItem.text(path.join(subFolders, fileName + ".js"), this.generateJSSource(className)),
              ProjectItem.text(path.join(subFolders, fileName + ".html"), this.generateHTMLSource())
            );

            return this.project.commitChanges()
              .then(() => this.ui.log(`Created ${name} in the '${path.join(self.project.root.name, subFolders)}' folder`));
          });
      });
github krausest / js-framework-benchmark / aurelia-v1.2.0-non-keyed / aurelia_project / generators / element.js View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.elements.add(
          ProjectItem.text(`${fileName}.js`, this.generateJSSource(className)),
          ProjectItem.text(`${fileName}.html`, this.generateHTMLSource(className))
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }
github ariovistus / fasting-troubadour / samples / cli-sample / aurelia_project / generators / component.ts View on Github external
.then(subFolders => {

            let fileName = this.project.makeFileName(name);
            let className = this.project.makeClassName(name);

            self.project.root.add(
              ProjectItem.text(path.join(subFolders, fileName + ".ts"), this.generateJSSource(className)),
              ProjectItem.text(path.join(subFolders, fileName + ".html"), this.generateHTMLSource(className))
            );

            return this.project.commitChanges()
              .then(() => this.ui.log(`Created ${name} in the '${path.join(self.project.root.name, subFolders)}' folder`));
          });
      });
github aurelia-contrib / aurelia-combo / aurelia_project / generators / attribute.js View on Github external
async execute() {
    const name = await this.ui.ensureAnswer(
      this.options.args[0],
      'What would you like to call the custom attribute?'
    );

    let fileName = this.project.makeFileName(name);
    let className = this.project.makeClassName(name);

    this.project.attributes.add(
      ProjectItem.text(`${fileName}.js`, this.generateSource(className))
    );

    await this.project.commitChanges();
    await this.ui.log(`Created ${fileName}.`);
  }
github ariovistus / fasting-troubadour / samples / cli-sample / aurelia_project / generators / attribute.ts View on Github external
.then(name => {
        let fileName = this.project.makeFileName(name);
        let className = this.project.makeClassName(name);

        this.project.attributes.add(
          ProjectItem.text(`${fileName}.ts`, this.generateSource(className))
        );

        return this.project.commitChanges()
          .then(() => this.ui.log(`Created ${fileName}.`));
      });
  }