mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Added Gulp build to Orchard.DynamicForms.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
<IISExpressAnonymousAuthentication />
|
||||
<IISExpressWindowsAuthentication />
|
||||
<IISExpressUseClassicPipelineMode />
|
||||
<UseGlobalApplicationHostFile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@@ -78,16 +79,15 @@
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\Forms.js">
|
||||
<DependentUpon>Forms.js.bundle</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Scripts\Forms.min.js">
|
||||
<DependentUpon>Forms.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Scripts\Layouts\Directives\Fieldset.js" />
|
||||
<Content Include="Scripts\Layouts\Directives\Form.js" />
|
||||
<Content Include="Scripts\Layouts\Models\Fieldset.js" />
|
||||
<Content Include="Scripts\Layouts\Models\Form.js" />
|
||||
<Content Include="gulpfile.js" />
|
||||
<Content Include="Scripts\LayoutEditor.js" />
|
||||
<Content Include="Scripts\LayoutEditor.min.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Directives\Fieldset.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Directives\Form.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Models\Fieldset.js" />
|
||||
<Content Include="Scripts\LayoutEditor\Models\Form.js" />
|
||||
<Content Include="Scripts\Lib.js" />
|
||||
<Content Include="Scripts\Lib.min.js" />
|
||||
<Content Include="Scripts\Lib\jquery.validate.js" />
|
||||
<Content Include="Scripts\Lib\jquery.validate.min.js">
|
||||
<DependentUpon>jquery.validate.js</DependentUpon>
|
||||
@@ -97,9 +97,12 @@
|
||||
<Content Include="Scripts\Lib\jquery.validate.unobtrusive.min.js">
|
||||
<DependentUpon>jquery.validate.unobtrusive.js</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Styles\forms-admin.min.css" />
|
||||
<Content Include="Styles\forms.css" />
|
||||
<Content Include="Styles\forms-admin.css" />
|
||||
<Content Include="Styles\forms.min.css" />
|
||||
<Content Include="Styles\menu.dynamicforms-admin.css" />
|
||||
<Content Include="Styles\menu.dynamicforms-admin.min.css" />
|
||||
<Content Include="Styles\menu.dynamicforms.png" />
|
||||
<Content Include="Web.config" />
|
||||
<Content Include="Scripts\Web.config" />
|
||||
@@ -462,17 +465,9 @@
|
||||
<DependentUpon>jquery.validate.unobtrusive.min.js</DependentUpon>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\Forms.js.bundle" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\LayoutEditor.Template.Form.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Scripts\Forms.min.js.map">
|
||||
<DependentUpon>Forms.min.js</DependentUpon>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Elements\Enumeration-RadioList.Design.cshtml" />
|
||||
</ItemGroup>
|
||||
@@ -515,6 +510,9 @@
|
||||
<ItemGroup>
|
||||
<Content Include="Views\LayoutEditor.Template.Fieldset.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="package.json" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||
|
@@ -4,8 +4,8 @@ namespace Orchard.DynamicForms {
|
||||
public class ResourceManifest : IResourceManifestProvider {
|
||||
public void BuildManifests(ResourceManifestBuilder builder) {
|
||||
var manifest = builder.Add();
|
||||
manifest.DefineStyle("DynamicForms.FormElements").SetUrl("forms-admin.css");
|
||||
manifest.DefineScript("DynamicForms.FormElements").SetUrl("Forms.min.js", "Forms.js").SetDependencies("Layouts.LayoutEditor");
|
||||
manifest.DefineStyle("DynamicForms.FormElements").SetUrl("forms-admin.min.css", "forms-admin.css");
|
||||
manifest.DefineScript("DynamicForms.FormElements").SetUrl("LayoutEditor.min.js", "LayoutEditor.js").SetDependencies("Layouts.LayoutEditor");
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<bundle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://vswebessentials.com/schemas/v1/bundle.xsd">
|
||||
<settings>
|
||||
<!--Determines if the bundle file should be automatically optimized after creation/update.-->
|
||||
<minify>true</minify>
|
||||
<!--Determine whether to generate/re-generate this bundle on building the solution.-->
|
||||
<runOnBuild>true</runOnBuild>
|
||||
<!--Specifies a custom subfolder to save files to. By default, compiled output will be placed in the same folder and nested under the original file.-->
|
||||
<outputDirectory />
|
||||
</settings>
|
||||
<!--The order of the <file> elements determines the order of the files in the bundle.-->
|
||||
<files>
|
||||
<file>/Scripts/Layouts/Directives/Form.js</file>
|
||||
<file>/Scripts/Layouts/Models/Form.js</file>
|
||||
<file>/Scripts/Layouts/Directives/Fieldset.js</file>
|
||||
<file>/Scripts/Layouts/Models/Fieldset.js</file>
|
||||
</files>
|
||||
</bundle>
|
@@ -1 +0,0 @@
|
||||
var LayoutEditor;angular.module("LayoutEditor").directive("orcLayoutForm",["$compile","scopeConfigurator","environment",function(n,t,i){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(n,i){t.configureForElement(n,i);t.configureForContainer(n,i);n.sortableOptions.axis="y";n.edit=function(){n.$root.editElement(n.element).then(function(t){t.cancel||(n.element.data=decodeURIComponent(t.element.data),n.element.name=t.elementEditorModel.name,n.element.formBindingContentType=t.elementEditorModel.formBindingContentType,n.$apply())})}}],templateUrl:i.templateUrl("Form"),replace:!0}}]),function(n,t){t.Form=function(i,r,u,f,e,o,s,h,c,l,a,v){var y,p;t.Element.call(this,"Form",i,r,u,f,e);t.Container.call(this,["Grid","Content"],v);y=this;this.isContainable=!0;this.dropTargetClass="layout-common-holder";this.contentType=h;this.contentTypeLabel=c;this.contentTypeClass=l;this.name=o||"Untitled";this.formBindingContentType=s;this.hasEditor=a;this.toObject=function(){var n=this.elementToObject();return n.name=this.name,n.formBindingContentType=this.formBindingContentType,n.children=this.childrenToObject(),n};p=this.getEditorObject;this.getEditorObject=function(){var t=p();return n.extend(t,{FormName:this.name,FormBindingContentType:this.formBindingContentType})};this.setChildren=function(n){this.children=n;_(this.children).each(function(n){n.parent=y;y.linkChild(n)})};this.linkChild=function(t){var i=t.getEditorObject;t.getEditorObject=function(){var t=i();return n.extend(t,{FormBindingContentType:y.formBindingContentType})}};this.setChildren(v)};t.Form.from=function(n){return new t.Form(n.data,n.htmlId,n.htmlClass,n.htmlStyle,n.isTemplated,n.name,n.formBindingContentType,n.contentType,n.contentTypeLabel,n.contentTypeClass,n.hasEditor,t.childrenFrom(n.children))};t.registerFactory("Form",function(n){return t.Form.from(n)})}(jQuery,LayoutEditor||(LayoutEditor={}));angular.module("LayoutEditor").directive("orcLayoutFieldset",["$compile","scopeConfigurator","environment",function(n,t,i){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(n,i){t.configureForElement(n,i);t.configureForContainer(n,i);n.sortableOptions.axis="y";n.edit=function(){n.$root.editElement(n.element).then(function(t){t.cancel||(n.element.data=decodeURIComponent(t.element.data),n.element.legend=t.elementEditorModel.legend,n.$apply())})}}],templateUrl:i.templateUrl("Fieldset"),replace:!0}}]),function(n,t){t.Fieldset=function(i,r,u,f,e,o,s,h,c,l,a){var v,y;t.Element.call(this,"Fieldset",i,r,u,f,e);t.Container.call(this,["Grid","Content"],a);v=this;this.isContainable=!0;this.dropTargetClass="layout-common-holder";this.contentType=s;this.contentTypeLabel=h;this.contentTypeClass=c;this.legend=o||"";this.hasEditor=l;this.toObject=function(){var n=this.elementToObject();return n.legend=this.legend,n.children=this.childrenToObject(),n};y=this.getEditorObject;this.getEditorObject=function(){var t=y();return n.extend(t,{Legend:this.legend})};this.setChildren=function(n){this.children=n;_(this.children).each(function(n){n.parent=v})};this.setChildren(a)};t.Fieldset.from=function(n){return new t.Fieldset(n.data,n.htmlId,n.htmlClass,n.htmlStyle,n.isTemplated,n.legend,n.contentType,n.contentTypeLabel,n.contentTypeClass,n.hasEditor,t.childrenFrom(n.children))};t.registerFactory("Fieldset",function(n){return t.Fieldset.from(n)})}(jQuery,LayoutEditor||(LayoutEditor={}));
|
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"version":3,
|
||||
"file":"Form.min.js",
|
||||
"lineCount":1,
|
||||
"mappings":"AAAAA,OACIC,OAAO,CAAC,cAAD,CACPC,UAAU,CAAC,eAAe,CAAE,QAAS,CAACC,CAAQ,CAAEC,CAAiB,CAAEC,CAA9B,CAA2C,CAC5E,MAAO,CACH,QAAQ,CAAE,GAAG,CACb,KAAK,CAAE,CAAE,OAAO,CAAE,GAAX,CAAgB,CACvB,UAAU,CAAEC,QAAS,CAACC,CAAM,CAAEC,CAAT,CAAmB,CACpCJ,CAAiBK,oBAAoB,CAACF,CAAM,CAAEC,CAAT,CAAkB,CACvDJ,CAAiBM,sBAAsB,CAACH,CAAM,CAAEC,CAAT,CAAkB,CACzDD,CAAMI,gBAAiBC,KAAQ,CAAE,GAAG,CACpCL,CAAMM,KAAM,CAAEC,QAAS,CAAA,CAAG,CACtBP,CAAMQ,MAAMC,YAAY,CAACT,CAAMU,QAAP,CAAgBC,KAAK,CAAC,QAAS,CAACC,CAAD,CAAO,CACtDA,CAAIC,O,GAERb,CAAMU,QAAQI,KAAM,CAAEC,kBAAkB,CAACH,CAAIF,QAAQI,KAAb,CAAmB,CAC3Dd,CAAMU,QAAQM,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,CAEDb,CAAYwC,gBAAgB,CAAC,MAAM,CAAE,QAAQ,CAACF,CAAD,CAAQ,CAAE,OAAOtC,CAAYE,KAAKkC,KAAK,CAACE,CAAD,CAA/B,CAAzB,CApEJ,EAsE1B,CAACG,MAAM,CAAEzC,YAAa,EAAG,CAACA,YAAa,CAAE,CAAA,CAAhB,CAAzB,CAA6C",
|
||||
"sources":["/Scripts/Layouts/Directives/Form.js","/Scripts/Layouts/Models/Form.js"],
|
||||
"names":["angular","module","directive","$compile","scopeConfigurator","environment","controller","$scope","$element","configureForElement","configureForContainer","sortableOptions","axis","edit","$scope.edit","$root","editElement","element","then","args","cancel","data","decodeURIComponent","name","elementEditorModel","$apply","templateUrl","LayoutEditor","$","Form","LayoutEditor.Form","htmlId","htmlClass","htmlStyle","isTemplated","formBindingContentType","contentType","contentTypeLabel","contentTypeClass","hasEditor","children","self","getEditorObject","Element","call","Container","isContainable","dropTargetClass","toObject",".toObject","result","elementToObject","childrenToObject",".getEditorObject","dto","extend","setChildren",".setChildren","_","each","child","parent","child.getEditorObject","from","LayoutEditor.Form.from","value","childrenFrom","registerFactory","jQuery"]
|
||||
}
|
File diff suppressed because one or more lines are too long
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/LayoutEditor.min.js
vendored
Normal file
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/LayoutEditor.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
var LayoutEditor;!function(e,t){t.Fieldset=function(n,i,o,r,l,a,c,d,s,m,h){t.Element.call(this,"Fieldset",n,i,o,r,l),t.Container.call(this,["Grid","Content"],h);var u=this;this.isContainable=!0,this.dropTargetClass="layout-common-holder",this.contentType=c,this.contentTypeLabel=d,this.contentTypeClass=s,this.legend=a||"",this.hasEditor=m,this.toObject=function(){var e=this.elementToObject();return e.legend=this.legend,e.children=this.childrenToObject(),e};var p=this.getEditorObject;this.getEditorObject=function(){var t=p();return e.extend(t,{Legend:this.legend})},this.setChildren=function(e){this.children=e,_(this.children).each(function(e){e.parent=u})},this.setChildren(h)},t.Fieldset.from=function(e){return new t.Fieldset(e.data,e.htmlId,e.htmlClass,e.htmlStyle,e.isTemplated,e.legend,e.contentType,e.contentTypeLabel,e.contentTypeClass,e.hasEditor,t.childrenFrom(e.children))},t.registerFactory("Fieldset",function(e){return t.Fieldset.from(e)})}(jQuery,LayoutEditor||(LayoutEditor={}));var LayoutEditor;!function(e,t){t.Form=function(n,i,o,r,l,a,c,d,s,m,h,u){t.Element.call(this,"Form",n,i,o,r,l),t.Container.call(this,["Grid","Content"],u);var p=this;this.isContainable=!0,this.dropTargetClass="layout-common-holder",this.contentType=d,this.contentTypeLabel=s,this.contentTypeClass=m,this.name=a||"Untitled",this.formBindingContentType=c,this.hasEditor=h,this.toObject=function(){var e=this.elementToObject();return e.name=this.name,e.formBindingContentType=this.formBindingContentType,e.children=this.childrenToObject(),e};var f=this.getEditorObject;this.getEditorObject=function(){var t=f();return e.extend(t,{FormName:this.name,FormBindingContentType:this.formBindingContentType})},this.setChildren=function(e){this.children=e,_(this.children).each(function(e){e.parent=p,p.linkChild(e)})},this.linkChild=function(t){var n=t.getEditorObject;t.getEditorObject=function(){var t=n();return e.extend(t,{FormBindingContentType:p.formBindingContentType})}},this.setChildren(u)},t.Form.from=function(e){return new t.Form(e.data,e.htmlId,e.htmlClass,e.htmlStyle,e.isTemplated,e.name,e.formBindingContentType,e.contentType,e.contentTypeLabel,e.contentTypeClass,e.hasEditor,t.childrenFrom(e.children))},t.registerFactory("Form",function(e){return t.Form.from(e)})}(jQuery,LayoutEditor||(LayoutEditor={})),angular.module("LayoutEditor").directive("orcLayoutFieldset",["$compile","scopeConfigurator","environment",function(e,t,n){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(e,n){t.configureForElement(e,n),t.configureForContainer(e,n),e.sortableOptions.axis="y",e.edit=function(){e.$root.editElement(e.element).then(function(t){t.cancel||(e.element.data=decodeURIComponent(t.element.data),e.element.legend=t.elementEditorModel.legend,e.$apply())})}}],templateUrl:n.templateUrl("Fieldset"),replace:!0}}]),angular.module("LayoutEditor").directive("orcLayoutForm",["$compile","scopeConfigurator","environment",function(e,t,n){return{restrict:"E",scope:{element:"="},controller:["$scope","$element",function(e,n){t.configureForElement(e,n),t.configureForContainer(e,n),e.sortableOptions.axis="y",e.edit=function(){e.$root.editElement(e.element).then(function(t){t.cancel||(e.element.data=decodeURIComponent(t.element.data),e.element.name=t.elementEditorModel.name,e.element.formBindingContentType=t.elementEditorModel.formBindingContentType,e.$apply())})}}],templateUrl:n.templateUrl("Form"),replace:!0}}]);
|
1679
src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Lib.js
Normal file
1679
src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Lib.js
Normal file
File diff suppressed because one or more lines are too long
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Lib.min.js
vendored
Normal file
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Scripts/Lib.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Styles/forms-admin.min.css
vendored
Normal file
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Styles/forms-admin.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.validation-message,.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.validation-summary{border:1px dashed #ccc;padding:.2em;background:#e8e8e8}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.form-field-element input[type=text],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.form-field-element input[type=password],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.form-field-element input[type=email],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.form-field-element input[type=tel],.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.form-field-element textarea{width:100%}.layout-editor .layout-content>.layout-element-wrapper .layout-content-markup>.form-field-element.form-field-element-enumeration ol{list-style:none}
|
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Styles/forms.min.css
vendored
Normal file
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Styles/forms.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.dynamic-form input.text,.dynamic-form input[type=text],.dynamic-form textarea.text{width:99%;line-height:1.5em;margin-bottom:.8em}.input-validation-error,input.text.input-validation-error{border:1px solid #990808}.field-validation-error{color:#990808}.form-field-element{margin:.8em 0 0}
|
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Styles/menu.dynamicforms-admin.min.css
vendored
Normal file
1
src/Orchard.Web/Modules/Orchard.DynamicForms/Styles/menu.dynamicforms-admin.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.navicon-form-submissions{background-image:url(menu.dynamicforms.png)!important}.navicon-form-submissions:hover{background-position:0 -30px!important}
|
@@ -1,6 +1,6 @@
|
||||
@model Orchard.DynamicForms.ViewModels.FormsIndexViewModel
|
||||
@{
|
||||
Style.Include("forms-admin.css");
|
||||
Style.Require("DynamicForms.FormElements");
|
||||
Layout.Title = T("Dynamic Forms");
|
||||
}
|
||||
<table class="items dynamic-forms">
|
||||
|
@@ -2,7 +2,7 @@
|
||||
@using Orchard.Utility.Extensions
|
||||
@model FormBindingSettings
|
||||
@{
|
||||
Style.Include("forms-admin.css");
|
||||
Style.Require("DynamicForms.FormElements");
|
||||
var partIndex = 0;
|
||||
}
|
||||
<fieldset class="bindings">
|
||||
|
@@ -2,7 +2,7 @@
|
||||
@using Orchard.DynamicForms.Elements
|
||||
@using Orchard.Layouts.Helpers
|
||||
@{
|
||||
Style.Include("forms.css");
|
||||
Style.Include("forms.css", "forms.min.css");
|
||||
}
|
||||
@{
|
||||
var contentItem = (ContentItem) Model.ContentItem;
|
||||
@@ -16,14 +16,11 @@
|
||||
|
||||
if (element.EnableClientValidation == true) {
|
||||
Script.Require("jQuery").AtFoot();
|
||||
Script.Include("lib/jquery.validate.js", "lib/jquery.validate.min.js").AtFoot();
|
||||
Script.Include("lib/jquery.validate.unobtrusive.js", "lib/jquery.validate.unobtrusive.min.js").AtFoot();
|
||||
Script.Include("lib/jquery.validate.unobtrusive.additional.js").AtFoot();
|
||||
Script.Include("Lib.js", "Lib.min.js").AtFoot();
|
||||
|
||||
Html.EnableUnobtrusiveJavaScript();
|
||||
Html.EnableClientValidation();
|
||||
}
|
||||
|
||||
}
|
||||
@tagBuilder.StartElement
|
||||
<form action="@formAction" method="@formMethod" enctype="multipart/form-data">
|
||||
|
@@ -1,6 +1,6 @@
|
||||
@model Orchard.DynamicForms.ViewModels.SubmissionViewModel
|
||||
@{
|
||||
Style.Include("forms-admin.css");
|
||||
Style.Require("DynamicForms.FormElements");
|
||||
Script.Require("ShapesBase");
|
||||
}
|
||||
@{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
@using Orchard.Utility.Extensions
|
||||
@model Orchard.DynamicForms.ViewModels.SubmissionsIndexViewModel
|
||||
@{
|
||||
Style.Include("forms-admin.css");
|
||||
Style.Include("forms-admin.css", "forms-admin.min.css"); // TODO: Shouldn't this be a Style.Require()?
|
||||
Script.Require("ShapesBase");
|
||||
Layout.Title = T("Submissions for {0}", Model.FormName);
|
||||
}
|
||||
|
101
src/Orchard.Web/Modules/Orchard.DynamicForms/gulpfile.js
Normal file
101
src/Orchard.Web/Modules/Orchard.DynamicForms/gulpfile.js
Normal file
@@ -0,0 +1,101 @@
|
||||
/// <binding BeforeBuild='build' ProjectOpened='watch' />
|
||||
|
||||
/*
|
||||
* This gulpfile provides an automated build pipeline for client-side assets in this project.
|
||||
*
|
||||
* To use this file you will need to:
|
||||
* - Install Node.js on your machine
|
||||
* - Run "npm install" in this folder (either via command line or a Visual Studio extension) to install dependency packages from package.json
|
||||
*
|
||||
* NOTE: If you install the Task Runner Explorer extension in Visual Studio the tasks in this
|
||||
* gulpfile will execute automatically on VS events for a more integrated/automated workflow. That's the
|
||||
* purpose of the <binding> comment element at the top.
|
||||
*/
|
||||
|
||||
var gulp = require("gulp"),
|
||||
newer = require("gulp-newer"),
|
||||
minify = require("gulp-minify-css"),
|
||||
uglify = require("gulp-uglify"),
|
||||
rename = require("gulp-rename"),
|
||||
concat = require("gulp-concat"),
|
||||
sourcemaps = require("gulp-sourcemaps"),
|
||||
merge = require("merge-stream");
|
||||
|
||||
/*
|
||||
* General tasks.
|
||||
*/
|
||||
|
||||
gulp.task("build", ["buildCss", "buildJs"], function () {
|
||||
});
|
||||
|
||||
gulp.task("watch", ["watchCss", "watchJs"], function () {
|
||||
});
|
||||
|
||||
/*
|
||||
* LESS/CSS compilation tasks.
|
||||
*/
|
||||
|
||||
var srcCss = [
|
||||
"Styles/forms-admin.css",
|
||||
"Styles/forms.css",
|
||||
"Styles/menu.dynamicforms-admin.css"
|
||||
];
|
||||
|
||||
gulp.task("buildCss", function () {
|
||||
return gulp.src(srcCss)
|
||||
.pipe(minify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest("Styles"));
|
||||
});
|
||||
|
||||
gulp.task("watchCss", function () {
|
||||
var watcher = gulp.watch(srcCss, ["buildCss"]);
|
||||
watcher.on("change", function (event) {
|
||||
console.log("CSS file " + event.path + " was " + event.type + ", running the 'buildCss' task...");
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
* JavaScript compilation tasks.
|
||||
*/
|
||||
|
||||
var srcJsLib = [
|
||||
"Scripts/Lib/jquery.validate.js",
|
||||
"Scripts/Lib/jquery.validate.unobtrusive.additional.js",
|
||||
"Scripts/Lib/jquery.validate.unobtrusive.js"
|
||||
];
|
||||
|
||||
var srcJsLayoutEditor = [
|
||||
"Scripts/LayoutEditor/Models/*.js",
|
||||
"Scripts/LayoutEditor/Directives/*.js"
|
||||
];
|
||||
|
||||
gulp.task("buildJs", function () {
|
||||
return merge([
|
||||
jsPipelineFrom(gulp.src(srcJsLib), "Scripts", "Lib.js"),
|
||||
jsPipelineFrom(gulp.src(srcJsLayoutEditor), "Scripts", "LayoutEditor.js")
|
||||
]);
|
||||
});
|
||||
|
||||
gulp.task("watchJs", function () {
|
||||
var watcher = gulp.watch([srcJsLib, srcJsLayoutEditor], ["buildJs"]);
|
||||
watcher.on("change", function (event) {
|
||||
console.log("JavaScript file " + event.path + " was " + event.type + ", running the 'buildJs' task...");
|
||||
});
|
||||
});
|
||||
|
||||
function jsPipelineFrom(inputStream, outputFolder, outputFile) {
|
||||
return inputStream
|
||||
.pipe(newer(outputFolder + "/" + outputFile))
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat(outputFile))
|
||||
.pipe(sourcemaps.write())
|
||||
.pipe(gulp.dest(outputFolder))
|
||||
.pipe(uglify())
|
||||
.pipe(rename({
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(outputFolder));
|
||||
}
|
15
src/Orchard.Web/Modules/Orchard.DynamicForms/package.json
Normal file
15
src/Orchard.Web/Modules/Orchard.DynamicForms/package.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"gulp": "^3.8.11",
|
||||
"gulp-newer": "^0.5.0",
|
||||
"gulp-sourcemaps": "^1.5.2",
|
||||
"gulp-less": "^3.0.3",
|
||||
"gulp-minify-css": "^1.1.1",
|
||||
"gulp-uglify": "^1.2.0",
|
||||
"gulp-rename": "^1.2.2",
|
||||
"gulp-concat": "^2.5.2",
|
||||
"merge-stream": "^0.1.7",
|
||||
"del": "^1.1.1"
|
||||
},
|
||||
"dependencies": { }
|
||||
}
|
@@ -156,4 +156,4 @@ function jsPipelineFrom(inputStream, outputFolder, outputFile) {
|
||||
suffix: ".min"
|
||||
}))
|
||||
.pipe(gulp.dest(outputFolder));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user