Skip to content

Commit

Permalink
webpack + es2015 modules:
Browse files Browse the repository at this point in the history
 - added source-map-loader into package.json
 - survey-knockout-bootstrap => survey-knockout
  • Loading branch information
dmitry-kurmanov committed Oct 26, 2016
1 parent 10b12a4 commit 0e1be22
Show file tree
Hide file tree
Showing 25 changed files with 29 additions and 28 deletions.
4 changes: 2 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ gulp.task('createPackage', function (callback) {
.pipe(jsonTransform(function (data) {
data.version = editorVersion;
data.main = paths.mainJSfile.replace(".js", ".min.js");
data.dependencies["survey-knockout-bootstrap"] = editorVersion;
data.dependencies["survey-knockout"] = editorVersion;
return data;
}, " "))
.pipe(rename("package.json"))
Expand All @@ -86,7 +86,7 @@ gulp.task('createPackage', function (callback) {
gulp.task('updatesurveyjsversion', function (callback) {
return gulp.src("package.json")
.pipe(jsonTransform(function (data) {
data.dependencies["survey-knockout-bootstrap"] = "^" + editorVersion;
data.dependencies["survey-knockout"] = "^" + editorVersion;
return data;
}, " "))
.pipe(gulp.dest(""));
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"karma-qunit": "^1.1.0",
"qunit": "^0.9.1",
"rimraf": "^2.5.4",
"source-map-loader": "^0.1.5",
"ts-loader": "^0.9.4",
"typescript": "^2.0.2",
"webpack-stream": "^3.2.0"
Expand Down
2 changes: 1 addition & 1 deletion packagetemplate.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"node": ">=0.10.0"
},
"dependencies": {
"survey-knockout-bootstrap": "^0.9.3",
"survey-knockout": "^0.10.0",
"knockout": "^3.4.0",
"bootstrap": "^3.3.6",
"ace-builds": "^1.2.2"
Expand Down
2 changes: 1 addition & 1 deletion src/dragdrophelper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class DragDropHelper {
static dataStart: string = "surveyjs,";
Expand Down
2 changes: 1 addition & 1 deletion src/editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {SurveyJSON5} from "./json5";
import {html as templateEditorHtml} from "./templateEditor.ko.html";
import {html as templatePageHtml} from "./template_page.html";
import {html as templateQuestionHtml} from "./template_question.html";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyEditor {
public static updateTextTimeout: number = 1000;
Expand Down
2 changes: 1 addition & 1 deletion src/objectEditor.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SurveyObjectProperty} from "./objectProperty";
import {editorLocalization} from "./editorLocalization";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyObjectEditor {
private selectedObjectValue: any;
Expand Down
2 changes: 1 addition & 1 deletion src/objectProperty.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SurveyPropertyEditorBase} from "./propertyEditors/propertyEditorBase";
import {editorLocalization} from "./editorLocalization";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export declare type SurveyOnPropertyChangedCallback = (property: SurveyObjectProperty, newValue: any) => void;

Expand Down
2 changes: 1 addition & 1 deletion src/objectVerbs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {editorLocalization} from "./editorLocalization";
import {SurveyHelper, ObjType} from "./surveyHelper";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyVerbs {
private surveyValue: Survey.Survey;
Expand Down
2 changes: 1 addition & 1 deletion src/pagesEditor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {SurveyHelper} from "./surveyHelper";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export declare type SurveyAddNewPageCallback = () => void;
export declare type SurveySelectPageCallback = (page: Survey.Page) => void;
Expand Down
2 changes: 1 addition & 1 deletion src/propertyEditors/propertyMatrixDropdownColumnsEditor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SurveyPropertyItemsEditor} from "./propertyItemsEditor";
import {SurveyPropertyEditorBase} from "./propertyEditorBase";
import {SurveyPropertyItemValuesEditor} from "./propertyItemValuesEditor";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyPropertyDropdownColumnsEditor extends SurveyPropertyItemsEditor {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion src/propertyEditors/propertyRestfullEditor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SurveyPropertyModalEditor} from "./propertyModalEditor";
import {SurveyPropertyEditorBase} from "./propertyEditorBase";
import {editorLocalization} from "../editorLocalization";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyPropertyResultfullEditor extends SurveyPropertyModalEditor {
koUrl: any; koPath: any; koValueName: any; koTitleName: any;
Expand Down
2 changes: 1 addition & 1 deletion src/propertyEditors/propertyTextItemsEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {SurveyPropertyEditorBase} from "./propertyEditorBase";
import {SurveyHelper} from "../surveyHelper";
import {editorLocalization} from "../editorLocalization";
import {SurveyPropertyValidatorsEditor} from "./propertyValidatorsEditor";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyPropertyTextItemsEditor extends SurveyPropertyItemsEditor {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion src/propertyEditors/propertyTriggersEditor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SurveyPropertyItemsEditor} from "./propertyItemsEditor";
import {SurveyPropertyEditorBase} from "./propertyEditorBase";
import {editorLocalization} from "../editorLocalization";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyPropertyTriggersEditor extends SurveyPropertyItemsEditor {
koQuestions: any; koPages: any;
Expand Down
2 changes: 1 addition & 1 deletion src/propertyEditors/propertyValidatorsEditor.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {SurveyPropertyItemsEditor} from "./propertyItemsEditor";
import {SurveyPropertyEditorBase} from "./propertyEditorBase";
import {SurveyObjectEditor} from "../objectEditor";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyPropertyValidatorsEditor extends SurveyPropertyItemsEditor {
private selectedObjectEditor: SurveyObjectEditor;
Expand Down
2 changes: 1 addition & 1 deletion src/surveyHelper.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {editorLocalization} from "./editorLocalization";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export enum ObjType { Unknown, Survey, Page, Question }
export class SurveyHelper {
Expand Down
2 changes: 1 addition & 1 deletion src/surveyObjects.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {SurveyHelper, ObjType} from "./surveyHelper";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyObjectItem {
public value: Survey.Base;
Expand Down
2 changes: 1 addition & 1 deletion src/textWorker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {SurveyJSON5} from "./json5";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

class TextParserPropery {
isFound: boolean;
Expand Down
2 changes: 1 addition & 1 deletion src/undoredo.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class SurveyUndoRedo {
private items: Array<UndoRedoItem>;
Expand Down
2 changes: 1 addition & 1 deletion tests/ObjectEditorTestedClasses.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

export class Car {
public name: string;
Expand Down
2 changes: 1 addition & 1 deletion tests/SurveyEditorTests.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {SurveyEditor} from "../src/editor";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

QUnit.module("surveyEditorTests");

Expand Down
2 changes: 1 addition & 1 deletion tests/propertyEditorsTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {SurveyPropertyDropdownColumnsEditor} from "../src/propertyEditors/proper
import {SurveyObjectProperty} from "../src/objectProperty";
import {SurveyPropertyTextEditor} from "../src/propertyEditors/propertyModalEditor";
import {SurveyPropertyResultfullEditor} from "../src/propertyEditors/propertyRestfullEditor";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";
import "../src/propertyEditors/propertyTextItemsEditor";

QUnit.module("PropertyEditorsTests");
Expand Down
2 changes: 1 addition & 1 deletion tests/surveyObjectsTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SurveyPropertyValidatorItem
} from "../src/propertyEditors/propertyValidatorsEditor";
import {SurveyVerbChangeTypeItem, SurveyVerbChangePageItem} from "../src/objectVerbs";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

QUnit.module("surveyObjects");

Expand Down
2 changes: 1 addition & 1 deletion tests/undoredoTests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {SurveyUndoRedo} from "../src/undoredo";
import {SurveyEditor} from "../src/editor";
import * as Survey from "survey-knockout-bootstrap";
import * as Survey from "survey-knockout";

QUnit.module("UndoRedoTests");

Expand Down
2 changes: 1 addition & 1 deletion typings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
"qunit": "github:DefinitelyTyped/DefinitelyTyped/qunit/qunit.d.ts#73110d92bdab2367e326f297bef3574285cba329"
},
"dependencies": {
"survey-knockout-bootstrap": "github:andrewtelnov/surveyjs/lib_typings/entries/ko.d.ts"
"survey-knockout": "github:andrewtelnov/surveyjs/lib_typings/entries/ko.d.ts"
}
}
8 changes: 4 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ module.exports = function(options) {
commonjs: 'knockout',
amd: 'knockout'
},
'survey-knockout-bootstrap': {
'survey-knockout': {
root: 'Survey',
commonjs2: 'survey-knockout-bootstrap',
commonjs: 'survey-knockout-bootstrap',
amd: 'survey-knockout-bootstrap'
commonjs2: 'survey-knockout',
commonjs: 'survey-knockout',
amd: 'survey-knockout'
}
},
module: {
Expand Down

0 comments on commit 0e1be22

Please sign in to comment.