diff --git a/Getting Started - Standalone/.gitignore b/Getting Started - Standalone/.gitignore new file mode 100644 index 0000000..1eae0cf --- /dev/null +++ b/Getting Started - Standalone/.gitignore @@ -0,0 +1,2 @@ +dist/ +node_modules/ diff --git a/Getting Started - Standalone/e2e/index.spec.js b/Getting Started - Standalone/e2e/index.spec.js new file mode 100644 index 0000000..e69de29 diff --git a/Getting Started - Standalone/e2e/protractor.conf.js b/Getting Started - Standalone/e2e/protractor.conf.js new file mode 100644 index 0000000..43eee1b --- /dev/null +++ b/Getting Started - Standalone/e2e/protractor.conf.js @@ -0,0 +1,21 @@ +exports.config = { + + allScriptsTimeout: 11000, + + capabilities: { + 'browserName': 'chrome' + }, + + framework: 'jasmine', + + jasmineNodeOpts: { + defaultTimeoutInterval: 10000 + }, + directConnect: true, + + onPrepare: function() { + browser.waitForAngularEnabled(false); + }, + + specs: ['./*.spec.js'] +}; \ No newline at end of file diff --git a/Getting Started - Standalone/gulpfile.js b/Getting Started - Standalone/gulpfile.js new file mode 100644 index 0000000..6a623f3 --- /dev/null +++ b/Getting Started - Standalone/gulpfile.js @@ -0,0 +1,62 @@ +'use strict'; + +var gulp = require('gulp'); + +/** + * Compile TypeScript to JS + */ +gulp.task('compile', function (done) { + var webpack = require('webpack'); + var webpackStream = require('webpack-stream'); + gulp.src(['./src/app/app.ts']).pipe(webpackStream({ + config: require('./webpack.config.js') + }, webpack)) + .pipe(gulp.dest('./dist')) + .on('end', function () { + done(); + }); +}); + +/** + * Testing spec files + */ +var protractor = require('gulp-protractor').protractor; +var webdriver_standalone = require('gulp-protractor').webdriver_standalone; +var webdriver_update = require('gulp-protractor').webdriver_update_specific; + +gulp.task('e2e-serve', webdriver_standalone); + +gulp.task('e2e-webdriver-update', webdriver_update({ + webdriverManagerArgs: ['--ie', '--edge'] +})); + +gulp.task('e2e-test', gulp.series('compile', function (done) { + var browserSync = require('browser-sync'); + var bs = browserSync.create('Essential JS 2'); + var options = { + server: { + baseDir: [ + './dist/', + ], + directory: true + }, + ui: false, + open: false, + notify: false + }; + bs.init(options, function () { + gulp.src(['./spec/**/*.spec.js']) + .pipe(protractor({ + configFile: 'e2e/protractor.conf.js' + })) + .on('error', function (e) { + console.error('Error: ' + e.message); + done(); + process.exit(1); + }) + .on('end', function () { + done(); + process.exit(0); + }); + }); +})); \ No newline at end of file diff --git a/Getting Started - Standalone/license b/Getting Started - Standalone/license new file mode 100644 index 0000000..111c12a --- /dev/null +++ b/Getting Started - Standalone/license @@ -0,0 +1,10 @@ +Essential JS 2 library is available under the Syncfusion Essential Studio program, and can be licensed either under the Syncfusion Community License Program or the Syncfusion commercial license. + +To be qualified for the Syncfusion Community License Program you must have a gross revenue of less than one (1) million U.S. dollars ($1,000,000.00 USD) per year and have less than five (5) developers in your organization, and agree to be bound by Syncfusion’s terms and conditions. + +Customers who do not qualify for the community license can contact sales@syncfusion.com for commercial licensing options. + +Under no circumstances can you use this product without (1) either a Community License or a commercial license and (2) without agreeing and abiding by Syncfusion’s license containing all terms and conditions. + +The Syncfusion license that contains the terms and conditions can be found at +https://www.syncfusion.com/content/downloads/syncfusion_license.pdf diff --git a/Getting Started - Standalone/package.json b/Getting Started - Standalone/package.json new file mode 100644 index 0000000..70da801 --- /dev/null +++ b/Getting Started - Standalone/package.json @@ -0,0 +1,38 @@ +{ + "name": "ej2-quickstart", + "version": "0.0.1", + "description": "Essential JS 2 typescript quick start application", + "author": "Syncfusion Inc.", + "license": "SEE LICENSE IN license", + "repository": { + "type": "git", + "url": "https://github.com/syncfusion/ej2-quickstart.git" + }, + "scripts": { + "start": "webpack serve --mode development", + "build": "webpack --mode production", + "serve": "gulp e2e-serve", + "test": "gulp e2e-test", + "update-webdriver": "gulp e2e-webdriver-update" + }, + "devDependencies": { + "ajv": "^8.11.2", + "browser-sync": "^2.18.12", + "css-loader": "^6.7.2", + "gulp": "*", + "gulp-protractor": "*", + "gulp-typescript": "*", + "html-webpack-plugin": "^5.5.0", + "jasmine": "^2.6.0", + "mini-css-extract-plugin": "^2.7.0", + "ts-loader": "^9.4.1", + "typescript": "*", + "webpack": "^5.75.0", + "webpack-cli": "^5.0.0", + "webpack-dev-server": "^5.2.1", + "webpack-stream": "^7.0.0" + }, + "dependencies": { + "@syncfusion/ej2": "*" + } +} diff --git a/Getting Started - Standalone/src/app/app.ts b/Getting Started - Standalone/src/app/app.ts new file mode 100644 index 0000000..5e87e2c --- /dev/null +++ b/Getting Started - Standalone/src/app/app.ts @@ -0,0 +1,17 @@ +import { PdfViewer, Toolbar, Magnification, Navigation, + Annotation, LinkAnnotation, ThumbnailView, + BookmarkView, TextSelection, TextSearch, + FormFields, FormDesigner } from '@syncfusion/ej2-pdfviewer'; + +PdfViewer.Inject(Toolbar, Magnification, Navigation, + Annotation, LinkAnnotation, ThumbnailView, + BookmarkView, TextSelection, TextSearch, + FormFields, FormDesigner); + +let pdfviewer: PdfViewer = new PdfViewer(); +// Specifies the URL or path of the PDF document to be loaded. +pdfviewer.documentPath = 'https://cdn.syncfusion.com/content/pdf/pdf-succinctly.pdf'; + +// Specifies the URL of the PDFium resource files required by the PDF Viewer. +pdfviewer.resourceUrl ='https://cdn.syncfusion.com/ej2/dist/ej2-pdfviewer-lib'; +pdfviewer.appendTo('#PdfViewer'); \ No newline at end of file diff --git a/Getting Started - Standalone/src/index.html b/Getting Started - Standalone/src/index.html new file mode 100644 index 0000000..4abb3ad --- /dev/null +++ b/Getting Started - Standalone/src/index.html @@ -0,0 +1,16 @@ + + +
+