ionic2 rc0 where to put all sass files? - ionic2

In Ionic Beta 2 we have decentralized our sass/scss files to our components.
Now in RC0 the upgrade guide by Ionic team is not their finest work, unfortunately.
This is how my app.scss looks like, it imports all our decentralised sass file:
#import '../+user/user-list/user-list.component';
Now imaging above 100 fold. What do I do to upgrade to RC0?

Turns out imports work like before. Against Ionic RC0 Upgrade Documentation there is no need to change any of your imports inside your app.scss. All good.
#import '../+user/user-list/user-list.component';
Works.

You need not import your scss files in ionic RC0. All you need is to create an scss file with the name you use in .ts selector.
Eg:
#Component({
selector: 'registration',
templateUrl: 'registration.html'
})
In this case i have to create registration.scss for scss. Refer 36th point under Modifying your Existing Project in https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#tab-inputconfig-7143

Related

Ember addon: Could not find module from within component

In a new ember 3.28 addon project:
npm install chart.js --save
ember g component-class chart
Insert <Chart /> into application.hbs on dummy app and in addons/component/chart.js, add this
import Chart from 'chart.js/auto';
Running app gives:
Uncaught Error: Could not find module `chart.js/auto` imported from `chartjs-test/components/chart`
Yet if the import Chart goes into the application.js route in the dummy app instead, it works. How can you import this module correctly from within an addon component?
Update: Same issue with other installed packages eg. import chroma from "chroma";
Turns out you need to add the same import statement into app/component/chart.js:
UPDATE:
The above isn't the proper way and causes issues when using the addon elsewhere. The real solution is to move ember-auto-import to dependencies from devDependencies in package.json of the addon

How to bundle the resources from an INSTALLED_APPS in Django with Webpack?

I have a main Django app, say myApp, which has subApp in its INSTALLED_APPS list. I use Webpack 5 to compile my main application's resources. The subApp is actually used in several applications which are in Django 2 and Django 3.
However I cannot find a way to tell Webpack, from myApp, to go look into subApp to compile the resource files that are in there. How could one do that? If it helps imagination, let's pretend there is no js/css optimisation in subApp and Webpack would manage that from myApp on compilation.
And if it's not possible directly in Webpack's config, would there be a way to import subApp's scripts and stylesheets in myApp's script files and stylesheets to make webpack compile them from there?
Any help welcome. Thanks for your help.

Ionic 2 CamScanner Plugin

i want to use cordova-camscanner in my ionic 2 project. But i cant import the Plugin. cordova-camscanner
I install it with:
cordova plugin add cordova-camscanner --variable ANDROID_APP_KEY=YOUR_APP_KEY
I see the Plugin in my list with:
ionic plugin list
But when i want to import ist with:
import {CordovaCamscanner} from 'ionic-native';
ionic says:
node_modules/ionic-native/dist/es5/index"' has no exported member 'CordovaCamscanner'
whats wrong?
If you look at Ionic Native's documentation, you can see that the CamScanner plugin is not part of it (not in the list on the left side).
So
import {CordovaCamscanner} from 'ionic-native';
is not supposed to work, because as the displayed error says, it is not an exported member of the Ionic Native module.

Can I use Ionic Material with Ionic 2?

I am going to develop an IOS application using Ionic 2 , Is there any ability to use Ionic Material IonicMaterial
to materialize my app ?
I know that Ionic 2 is already materialized but I want to make benefit of Ionic material library.
Yes .You can use.
install angular material
1.
npm install --save #angular/material
2.import and add
import { MaterialModule } from '#angular/material';
// other imports
#NgModule({
imports: [MaterialModule],
...
})
then you can use material components

Ember.js and UIKIT

I try to add UIKIT to my Ember.js project
how to do it?
1: bower install --save uikit
All work fine on bower.json
i don't know what to put on ember-cli-build.js
e.g : app.import('bower_components/uikit/css/uikit.css');
How to do about js files?
Thanks
you import js files same way as css files,
if js files are in bower_components/uikit/js/uikit.js you do
app.import('bower_components/uikit/js/uikit.js');