How to use the hexo-fs.mkdirs function in hexo-fs

To help you get started, we’ve selected a few hexo-fs 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 hexojs / hexo / test / scripts / theme / theme.js View on Github external
before(() => Promise.all([
    fs.mkdirs(themeDir),
    fs.writeFile(hexo.config_path, 'theme: test')
  ]).then(() => hexo.init()));
github hexojs / hexo / test / scripts / console / config.js View on Github external
  before(() => fs.mkdirs(hexo.base_dir).then(() => hexo.init()));
github hexojs / hexo / test / scripts / processors / asset.js View on Github external
  before(() => fs.mkdirs(baseDir).then(() => hexo.init()));
github hexojs / hexo / test / scripts / console / generate.js View on Github external
beforeEach(() => {
    hexo = new Hexo(pathFn.join(__dirname, 'generate_test'), {silent: true});
    generate = generateConsole.bind(hexo);

    return fs.mkdirs(hexo.base_dir).then(() => hexo.init());
  });
github hexojs / hexo / test / scripts / console / new.js View on Github external
before(() => {
    clock = sinon.useFakeTimers(now);

    return fs.mkdirs(hexo.base_dir).then(() => hexo.init()).then(() => hexo.scaffold.set('post', [
      'title: {{ title }}',
      'date: {{ date }}',
      'tags:',
      '---'
    ].join('\n'))).then(() => hexo.scaffold.set('draft', [
      'title: {{ title }}',
      'tags:',
      '---'
    ].join('\n')));
  });
github hexojs / hexo / test / scripts / filters / new_post_path.js View on Github external
before(() => {
    hexo.config.new_post_name = NEW_POST_NAME;

    return fs.mkdirs(hexo.base_dir).then(() => hexo.init());
  });
github hexojs / hexo / test / scripts / console / help.js View on Github external
before(function() {
    return fs.mkdirs(hexo.base_dir).then(function() {
      return hexo.init();
    });
  });
github hexojs / hexo / test / scripts / box / box.js View on Github external
it('process() - delete', () => {
    const box = newBox('test');
    const cacheId = 'test/a.txt';

    const processor = sinon.spy(file => {
      file.type.should.eql('delete');
    });

    box.addProcessor(processor);

    return Promise.all([
      fs.mkdirs(box.base),
      box.Cache.insert({
        _id: cacheId
      })
    ]).then(() => box.process()).then(() => {
      processor.calledOnce.should.be.true;
    }).finally(() => fs.rmdir(box.base));
  });
github hexojs / hexo / test / scripts / console / render.js View on Github external
  before(() => fs.mkdirs(hexo.base_dir).then(() => hexo.init()));
github hexojs / hexo / test / scripts / processors / post.js View on Github external
  before(() => fs.mkdirs(baseDir).then(() => hexo.init()));