How to use the @angular/cli/ember-cli/lib/ext/promise.denodeify function in @angular/cli

To help you get started, we’ve selected a few @angular/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 angular / angular-cli / tests / acceptance / github-pages-deploy.spec.js View on Github external
'use strict';

var ng = require('../helpers/ng');
var tmp = require('../helpers/tmp');
var Promise = require('@angular/cli/ember-cli/lib/ext/promise');
var fs = require('fs');
var path = require('path');
var chai = require('chai');
var sinon = require('sinon');
var ExecStub = require('../helpers/exec-stub');
var https = require('https');
var SilentError = require('silent-error');

const expect = chai.expect;
const fsWriteFile = Promise.denodeify(fs.writeFile);
const fsMkdir = Promise.denodeify(fs.mkdir);

describe('Acceptance: ng github-pages:deploy', function() {
  let execStub;
  let project = 'foo',
    initialBranch = 'master',
    ghPagesBranch = 'gh-pages',
    message = 'new gh-pages version',
    remote = 'origin  git@github.com:username/project.git (fetch)';

  function setupDist() {
    return fsMkdir('./dist')
      .then(() => {
        let indexHtml = path.join(process.cwd(), 'dist', 'index.html');
        let indexData = `<title>project</title>\n`;
        return fsWriteFile(indexHtml, indexData, 'utf8');
      });
github angular / angular-cli / tests / acceptance / github-pages-deploy.spec.js View on Github external
/*eslint-disable no-console */
'use strict';

var ng = require('../helpers/ng');
var tmp = require('../helpers/tmp');
var Promise = require('@angular/cli/ember-cli/lib/ext/promise');
var fs = require('fs');
var path = require('path');
var chai = require('chai');
var sinon = require('sinon');
var ExecStub = require('../helpers/exec-stub');
var https = require('https');
var SilentError = require('silent-error');

const expect = chai.expect;
const fsWriteFile = Promise.denodeify(fs.writeFile);
const fsMkdir = Promise.denodeify(fs.mkdir);

describe('Acceptance: ng github-pages:deploy', function() {
  let execStub;
  let project = 'foo',
    initialBranch = 'master',
    ghPagesBranch = 'gh-pages',
    message = 'new gh-pages version',
    remote = 'origin  git@github.com:username/project.git (fetch)';

  function setupDist() {
    return fsMkdir('./dist')
      .then(() =&gt; {
        let indexHtml = path.join(process.cwd(), 'dist', 'index.html');
        let indexData = `<title>project</title>\n`;
        return fsWriteFile(indexHtml, indexData, 'utf8');