8
0

test.js 739 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
  3. * For licensing, see LICENSE.md.
  4. */
  5. /* eslint-env node */
  6. const snippetAdapter = require( './snippetadapter' );
  7. const path = require( 'path' );
  8. snippetAdapter( {
  9. snippetSource: {
  10. html: path.resolve( __dirname, '../../docs/_snippets/basic/integration1.html' ),
  11. js: path.resolve( __dirname, '../../docs/_snippets/basic/integration1.js' )
  12. },
  13. snippetPath: 'basic/integration1',
  14. outputPath: path.resolve( __dirname, '../../build/docs/_snippets' ),
  15. relativeOutputPath: '../../_snippets',
  16. basePath: '../..'
  17. } )
  18. .then( data => {
  19. console.log( 'Success!' );
  20. console.log( data.html );
  21. } )
  22. .catch( err => {
  23. console.error( err.stack );
  24. } );